CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解
1、停用mysql服务:#/etc/rc.d/init.d/mysqldstop2、输入命令:#mysqld_safe--user=mysql--skip-grant-tables--skip-networking&3、登入数据库:#mysql-urootmysql4、mysql>usemysql;结果如下:Databasechanged5、mysql>UPDATEuserSETPassword=