Posted on 2011-05-10 20:54
asdtiang 閱讀(535)
評論(0) 編輯 收藏
# /etc/init.d/mysql stop
# 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
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <輸入新設的密碼newpassword>
mysql>
天蒼蒼,野茫茫,風吹草底見牛羊