Access denied for user 'root'@'localhost' (using password: YES)

今天在centos上安装mysql,添加用户一直报Access denied for user 'root'@'localhost' (using password: YES),mysql

试过了网上各类方法,sql

mysql -uroot -p

一样都是无济于事,后来我打开mysql的配置文件centos

/etc/my.cnf code

中间一行user:mysqlblog

mysql -u mysql

就能够正常使用了class

相关文章
相关标签/搜索