mysql 初始密码 设置

mysql root 密碼的設置方法 

shell> mysql -u root mysql 
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password'); 

If you know what you are doing, you can also directly manipulate the privilege tables: 

shell> mysql -u root mysql 
mysql> UPDATE user SET Password=PASSWORD('new_password') 
-> WHERE user='root'; 
mysql> FLUSH PRIVILEGES;  

原文地址:https://www.cnblogs.com/gongxijun/p/4136983.html