mysql8 remote authorization problem

mysql8, you need to create a new user for authorization, and directly use root authorization to report an error;
using the original method, the error message is as follows: the
original method

grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;

Insert picture description here

Official website documentation
text: the Using GRANT to the Modify the Account the Properties OTHER Within last Privilege Assignments' This Includes.
Authentication, SSL, and Resource-limit the Properties INSTEAD, the Establish SUCH the Properties AT the Account-Creation.
Time with the CREATE the USER or the Modify Them afterward with the ALTER the USER.
Translations : Use grant to modify account attributes other than account permission assignment. Including authentication, SSL, and resource limit configuration. Instead, create user create user or modify alter user after creation.

Need to create a new user for authorization

The user created here is admin and the password is 123456

create user 'admin' identified with mysql_native_password by '123456';

Then execute:

grant all privileges on *.* to 'admin';
flush privileges;

Guess you like

Origin blog.csdn.net/huangbaokang/article/details/112989669