When the server is not running PHP, not installed phpMyAdmin, remote management of MySQL is necessary.
First step: Turn on remote access for MySQL users
Mysql-u root-p MySQL # 1th MySQL is the execution command, and the 2nd MySQL is the system data name
In the MySQL console perform:
Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with Grant option;# root is the username,% represents any host, ' 123456 ' specified login password (this and this The root password of the ground can be set different, non-affected) flush privileges; # overloaded system permissions exit;
If you want to allow user root to connect to the MySQL service from a host that is IP 192.168.137.99:
Grant all privileges on * * to ' root ' @ ' 192.168.137.99 ' identified by ' 123456 ' with grant Option;flush privileges;
Step two: Set up a firewall to allow 3306 ports to be accessed externally
Iptables-i input-p tcp-m State--state new-m TCP--dport 3306-j accept# See if the rule is in effect Iptables-l-N # or: Service iptables status# the production environment is not secure at this time, the port should be closed after remote administration, and the rule added before the deletion iptables-d input-p tcp-m State--state new-m TCP--dport 3306-j ACCEPT
Note : the above iptables Add/Remove rules are temporary and will need to be saved if a reboot is required:
Service Iptables Save # or:/etc/init.d/iptables save
Other than that
Vi/etc/sysconfig/iptables # plus the following line of rules is also possible-a input-p tcp-m state--state new-m TCP--dport 3306-j ACCEPT
Remote management of the database software, win system can use SQLyog (), with several remote software, feel this use is pretty good.
Additional instructions If you have phpMyAdmin installed, you can also modify user permissions as follows:
Open MySQL remote connection under Linux/centos, manage database remotely