ubuntu mysql Access denied for user root@localhost
Posted 秦无殇的博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu mysql Access denied for user root@localhost相关的知识,希望对你有一定的参考价值。
解决办法:
1. vim mysqld.cnf 路径:/etc/mysql/mysql.conf.d
在[mysqld]下添加skip-grant-tables
2. 重启mysql服务
service mysql restart
3.连接mysql并设置密码
mysql -u root
mysql>
flush privileges
mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "123456";
参考博客:https://blog.csdn.net/lisongjia123/article/details/57418989
以上是关于ubuntu mysql Access denied for user root@localhost的主要内容,如果未能解决你的问题,请参考以下文章
9-Ubuntu中mysql出现ERROR1698(28000):Access denied for user root@localhost错误解决方法
Ubuntu下连接mysql出现 ERROR 1698 (28000): Access denied for user 'root'@'localhost'错误解决方法
ubuntu下 mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhos
解决MySql ERROR 1698 (28000) 错误:Access denied for user 'root'@'localhost'
mysql出现ERROR1698(28000):Access denied for user root@localhost错误解决方法