1.先停掉mysql
# /etc/init.d/mysql stop
2.以–skip-grant-table& 的參數啟動mysql
/usr/bin/mysqld_safe --skip-grant-table&
3. 更改root 密碼
# mysql mysql
mysql> UPDATE user SET password=password('123456') WHERE user='root';
mysql> exit
4.停掉mysql再重跑
# /etc/init.d/mysql stop
# mysql -u root -p
reference : http://tw.myblog.yahoo.com/cherry-liang/article?mid=579&prev=633&next=-2&page=1&sc=1
沒有留言:
張貼留言