MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 的解决办法和原因
这两天下载了MySQL5.7.11进行安装,发现到了初次使用输入密码的时候,不管怎样都进不去,即使按照网上说的在mysqld 下面添加skip-grant-tables也是不行,后来研究了两天,终于找出原因和解决办法。
代码如下:
[mysqlld]
skip-grant-tables;
原因:Mysql 5.6及以后版本出处于安全考虑,root密码不为空。所以在MySQL的安装过程中,会生成一个随机密码作为初始密码。

这里的密码不能为空了,要输入随机设置的密码
密码在:
D:\Program Files\mysql-5.7.11-winx\data的

中有:

这个就是随机的密码,使用root账户和这个随机密码就可以登录了。
您可能感兴趣的文章:
mysql Access denied for user ‘root’@’localhost’ (using password: YES)解决方法MYSQL ERROR 1045 (28000): Access denied for user (using password: YES)问题的解决mysql ERROR 1044 (42000): Access denied for user ''''@''localhost'' to databaselinux mysql忘记密码的多种解决或Access denied for user ''root''@''localhost''解决mysql创建数据库后出现:Access denied for user ''root''@''%'' to database ''xxx''的问题解决ubuntu 16.04安装mysql5.7.17后,登录时出现ERROR 1045 (28000): Access denied for user ''root''@''localhost''问题ubuntu系统中Mysql ERROR 1045 (28000): Access denied for user root@ localhost问题的解决方法新装MySql后登录出现root帐号提示mysql ERROR 1045 (28000): Access denied for use的解决办法Linux连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决方法