When the server is not running PHP, not installed phpMyAdmin, remote management of MySQL is necessary. Because it is set under CentOS, the title is added to CentOS, and the following commands should be OK under the Debian system.
- 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 user name,% for any host, ' 123456 ' specified login password (this and local root password can be set differently, not affect each other)
- Flush privileges; # Overloaded System permissions
- Exit;
Allow Port 3306
- Iptables -I INPUT -p TCP -m state --StateNEW -m TCP --dport 3306< c14> -J ACCEPT
- # See if the rules are 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 management, and the previously added rules should be removed
- Iptables -D INPUT -p TCP -m state --StateNEW -m TCP --dport 33 -J ACCEPT
PS, above iptables Add/Remove rules are temporary, if you need to restart after the effective, you need to save the changes:
Service Iptables Save # or:/etc/init.d/iptables save
Other than that
Vi/etc/sysconfig/iptables # plus the following line of rules is OK
-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.
Open MySQL remote connection under CentOS, remote Management database