sh# /etc/init.d/mysqld stop
sh# mysqld_safe --skip_grant_tables --defaults-file=/etc/my.cnf
sh# mysql -u root
mysql> update mysql.user set password=PASSWORD('********') where User='root';
OR
mysql> set password for 'root'@'localhost' = PASSWORD('********');
mysql> flush privileges;
mysql> quit
sh# /etc/init.d/mysqld stop
sh# /etc/init.d/mysqld start
没有评论:
发表评论