Linux 操作MySql

登陆mysql
#mysql -u root -p 123456;

修改root密码
mysql > use mysql;
mysql > update user set password = password("123456") where user = "root";
mysql > flush privileges;

mysql重启
#service mysqld restart;

你可能感兴趣的:(Linux 操作MySql)