MYSQL没有初始密码解决方法

作者: chiver 2008-04-27 00:00:21
#/etc/init.d/mysql stop
#cd /usr/local/mysql
#mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
#mysql -u root mysql
mysql > UPPATE user SET password=PASSWORD('newpassword') where USER='root';
mysql > FLUSH PRIVILEGES;
mysql > quit ;
#/etc/init.d/mysql restart
#mysql -u root -p

相关资讯