Note: MySQL is deployed on server A, and the internal network host B is connected to the server A through the client tool A to perform database operations.
1.1 Enter mysql on the server A. Suppose the MySQL account on the server A is root: ROOT:
and then enter the password!
1.2 Give the host B’s permissions to operate the database
Note: Give [email protected] The permissions of using all databases, use Username account to log in on the host 192.168.0.1
Note: Gives the highest permissions of [email protected] operation database Newdb, use the Username account to log in on the host 192.168.0.1, no password password without password
Example:
Note: [email protected] uses the permissions of all databases, use the root account to log in on the host 192.168.0.1, the password is: 123456
2, remove the account
Instructions: Remove the account root, so that the host 192.168.0.1 will no longer use the database on the root user to operate the server A