二 10 2010
centos中mysql重置密码
mysql YUM 安装路径rpm -ql mysql (usr/bin)
方法:
# /etc/init.d/mysqld 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/mysqld restart
# mysql -uroot -p
Leave a Reply
You must be logged in to post a comment.
