MySQL/mysql set remote access link

1. First enter the linux connection database and enter the password:

1
mysql -uroot -p

 2. Enter the following command to authorize:

1
GRANT ALL PRIVILEGES ON *.* TO  'root' @ '%'  IDENTIFIED BY  '这里写自己数据库的密码'  WITH GRANT OPTION;

 3. Refresh permissions:

FLUSH  PRIVILEGES;

4. But after adding permissions, it still can't connect to the database. You must add port 3306 to the server's security group



FLUSH  PRIVILEGES;

Guess you like

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