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;  

posted @ 2014-12-02 11:18  龚细军  阅读(310)  评论(0编辑  收藏  举报