mysql enables remote access:
1. Open mysql server and set mysql access permissions
mysql>grant all privileges on *.* to 'root'@'%' identified by 'youpassword' with grant option;
Description: Root represents the user name. % represents all ip addresses, you can also set a specified ip address
2. After executing flush privileges;
3. Check the user table, you can see:
host The value is %, which means that when the root user logs in to mysql, any IP can be allowed to access the mysql server.
4. If the mysql management tool navicat is used, the database cannot be connected and an error number (10038) is prompted;
Solution :
Command to open
vi /etc/mysql/my.conf
Change
bind-address = 127.0.0.1
to
bind-address = 0.0.0.0
and then restart mysql Server: service mysql restart;