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

后端 未结 17 1746
执笔经年
执笔经年 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:37

    step 1. sudo mysql -u root -p

    step 2. USE mysql;

    step 3. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'admin';

    Here 'admin' is your new password, yo can change it.

    step 4. exit

    Thanks. You are done.

提交回复
热议问题