zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    第五章4
    第五章3
    第五章2
    第五章1
    第四章14
    第四章13
    第四章12
    第四章11
    第五章例5-6
    第五章例5-4
  • 原文地址:https://www.cnblogs.com/webDepOfQWS/p/9737244.html
Copyright © 2011-2022 走看看