重新设定mysql密码~,网上方法都是,这里选一个。

新开一个终端,对,就是要输入jobs后没有输出的终端。

1终止MYSQL服务。

sudo killall mysqld

 2

特殊运行MYSQL

mysqld_safe --skip-grant-tables &

登录

mysql -u root

设密码

 

 mysql> use mysql;

  Reading table information for completion of table and column names

  You can turn off this feature to get a quicker startup with -A

  Database changed

  mysql> update user set Password = PASSWORD('your new password') where User = 'root' ;

  Query OK, 3 rows affected (0.02 sec)

  Rows matched: 3  Changed: 3  Warnings: 0

  mysql> quit

  Bye

好了。

不要漏了sql语句后的一个;号 

 

posted @ 2011-06-29 21:08  snowlueng  阅读(164)  评论(0编辑  收藏  举报