ERROR 1698 (28000): Access denied for user 'root'@'localhost'

后端 未结 17 1567
执笔经年
执笔经年 2020-11-22 10:00

I\'m setting up a new server and keep running into this problem.

When I try to login to the MySQL database with the root user, I get the error:

17条回答
  •  情歌与酒
    2020-11-22 10:41

    I would suggest to remove the Mysql connection -

    UPDATE-This is for Mysql version 5.5,if your version is different ,please change the first line accordingly

    sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
    sudo rm -rf /etc/mysql /var/lib/mysql
    sudo apt-get autoremove
    sudo apt-get autoclean
    

    And Install Again But this time set a root password yourself. This will save a lot of effort.

    sudo apt-get update
    sudo apt-get install mysql-server
    

提交回复
热议问题