ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:NO)
于是重改密码!
#/etc/init.d/mysqlstop
#mysqld_safe--user=mysql--skip-grant-tables--skip-networking&
#mysql-urootmysql
mysql>UPDATEuserSETPassword=PASSWORD('newpassword')whereUSER='root';
mysql>FLUSHPRIVILEGES;
mysql>quit
#/etc/init.d/mysqldrestart
#mysql-uroot-p
Enterpassword:
mysql>
搞定!

你可能感兴趣的:(error,user,Access,for,1045,denied,(28000):,password:,(using,NO))