$ sudo service mysql stop
$ sudo mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
$ mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('NewPassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit;
$ sudo killall mysqld_safe
$ sudo service mysql start
沒有留言:
張貼留言