This article mainly introduces in detail the method of modifying mysql to allow remote connections. It has certain reference value. Interested friends can refer to
Regarding the issue of mysql remote connections, everyone In company work, we often encounter mysql databases stored on someone's computer. If you want to connect to the mysql service, the computer with the mysql service must enable remote connection
Step 1, use dos to connect to your database, (I am talking about win here)
Then select the system library, mysql
command: use mysql, of course you can also check which libraries have been created in your mysql
and then select mysql
Then execute the command to modify permissions: GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
This sentence is a very critical sentence
After execution, clear the cache
ok Basically
If you are not worried, you can also check
Now the database in mysql on your machine can be accessed by others if it is under the LAN. .
The above is the detailed content of Detailed explanation of how to modify MySQL to enable remote connection instances. For more information, please follow other related articles on the PHP Chinese website!