Archive for 二月 10th, 2010

10 2010

centos中mysql重置密码

Published by 笨二十一 under MySQL,Web技术

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

No responses yet