Mysql初始安装(解压版)在运行mysqld --initialize初始化数据库后,再用root登陆报using password: no异常解决
2017-12-07 23:09
459 查看
mysql root登陆报using password: no异常解决
安装刚在windows上装了Mysql5.7版,[安装方法](http://www.jb51.net/article/84324.htm)
问题
在安装了mysql的服务之后运行了mysql –initialize方法初始化了数据库。
然后再用sqlyog连接时候就报using password : no异常
因为是刚安装的数据库,密码也没设置过,所以不存在输错或忘记密码的问题,在网上百度了下,大都是在linux上的问题,并且基本是重复的拷贝粘贴,还有要你直接改数据表的,总不至于刚安装就去改系统表吧,没办法,只好看文档。
解决
爬到官网 上后,看在windows下的安装文档,一步步找到这一页,手动初始化数据库
找到以下文字:
可以看到用–initialize选项初始化将会给root用户一个随机密码,那么这个随机密码保存在哪呢?
看下图的中间那句话:
要你去看错误日志,但错误日志在哪啊,找了很久也没发现log后缀的文件,后面在data目录下有个err后缀的文件,进去看日志:
果然看到一句”A temporary password is generated for root@localhost: xxxxxxxx
好了,接下来就是mysql -u root -p
xxxxxx
ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘new_password’;
其实到这里mysql才算安装完成。
相关文章推荐
- mysql Access denied for user 'root'@'localhost' (using password: NO)解决办法
- 登陆MySQL出现error:‘Access denied for user 'root'@localhost (using password :YES)'解决方法
- mySQL 5.7版 解决密码登录失败Access denied for user 'root'@'localhost' (using password: NO)
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- MYSQL-Access denied for user 'root'@'localhost' (using password:NO) 解决记录
- 解决MySQL 报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- MySQL5.7使用错误解决:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)【取消或重设root密码】
- mysql中出现 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的解决办法
- ubuntu 系统解决mysql连接问题(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO))
- 解决用Mysql 使用navicate远程连接数据库出现1045 access denied for user 'root'@'localhost' using password yes
- mySQL 5.7版 解决密码登录失败Access denied for user 'root'@'localhost' (using password: NO)
- mysql update完root用户密码后,再登陆报错”Access denied for user 'root'@'localhost' (using password: YES)“的解决方法
- 解决数据库连接报ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)问题
- mysql安装在centos7报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- mysql 安装问题 access denied for user 'root'@'localhost' using password yes/no
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- Mysql安装发生「Access denied for user ‘root’@’localhost’ (using password: NO)」错误
- mysql安装在centos7报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)