By default, mysql does not allow remote access. now you need to add a mysql account with original access (you need to go to the mysql Command Line): GRANTALLPRIVILEGESON *. * TOremote @ % IDENTIFIEDBY the plaintext password WITHGRANTOPTION for remote logon; execute the following statement to take effect: flushprivileges; at ce
By default, mysql does not allow remote access. now you need to add a mysql account with original access (you need to enter the mysql Command Line): grant all privileges on *. * TO remote @ % identified by 'plaintext password for remote logins 'with grant option; execute the following statement TO apply: flush privileges; On ce
By default, mysql does not allow remote access.
Now you need to add a mysql account with original access (you need to enter the mysql Command Line ):
Grant all privileges on *. * TO remote @ "%" identified by 'plaintext password for remote logon 'with grant option;
Execute the following statement to take effect:
Flush privileges;
In centos, iptables is enabled by default, but port 3306 is not enabled. You need to manually specify this parameter.
Log out of mysql and enter:
Vi/etc/sysconfig/iptables
Add the following string
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 3306-j ACCEPT
Restart iptables:
/Etc/rc. d/init. d/iptables restart
Now you can connect to the remote mysql database ~