reason:MySQLSet remote access permissions.
Update permissions on this server terminal
first step,Log in to mysql
[root@iZwz9ge5ckboywt63qr7qgZ ~]# mysql -u root -p
- 1
- 2
Enter your password
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 492
Server version: 5.7.39-log Source distribution
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
Step 2: Use the database
mysql> use mysql
- 1
result
Database changed
- 1
- 2
Step 3: Update the user access host data
mysql> update user set host = '%' where user = 'root';
- 1
result
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
- 1
- 2
- 3
The last step is to update permissions. (Symbols need to be added;)
mysql> FLUSH PRIVILEGES;
- 1
Query OK, 0 rows affected (0.04 sec)
- 1
- 2
It's done. If possible, you might as well pay attention and give me some rewards. Thank you.
If you have any questions, you can also ask questions in the comment area, thanks for your support.