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

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

    That worked for me:

    mysql --user=root mysql
    CREATE USER 'some_user'@'%' IDENTIFIED BY 'some_pass';
    GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'%' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    

提交回复
热议问题