/etc/rc.d/init.d/mysql status

/etc/rc.d/init.d/mysql stop

mysqld_safe --skip-grant-tables&

  mysql -u root mysql

  mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='root';

  mysql> FLUSH PRIVILEGES;

/etc/rc.d/init.d/mysql  start

posted on 2015-05-20 19:38  凌度  阅读(201)  评论(0编辑  收藏  举报