mysql remote access 1045 problem solving

mysql remote access 1045 problem solving

First enter the mysql database, and then enter the following two commands

grant all privileges on *.* to 'root'@'%' identified by 'password';
flush privileges;

The first   *  is the database, which can be changed to the database name that allows access

The second *   is the table name of the database, which means that any table is allowed to be accessed 

root represents the username used for remote login, which can be customized

% stands for allowing any ip to log in. If you want to specify a specific IP, you can replace %.

password represents the password used for remote login, which can be customized

flush privileges; this is to make the permissions take effect immediately

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325018352&siteId=291194637