mysql configuration LAN access

1. Enter mysql

mysql -u root -p

insert image description here

2. Unlock the mysql LAN command

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

insert image description here

3. Clear the cache and take effect immediately

flush privileges;

insert image description here

4. Check the IP of the machine, which will be used for subsequent connections

ipconfig

insert image description here

5. Let people in the same LAN use Navicat to connect and test

insert image description here

6. If the connection fails, check whether the firewall of your computer is closed. If the firewall is turned on, the connection cannot be successful.

Guess you like

Origin blog.csdn.net/LuoHuaX/article/details/127003897