When the server does not run php or install phpmyadmin, it is necessary to remotely manage mysql. Because it is set under CentOS, the title is added with CentOS. the following commands should also be OK in debian and other systems. Mysql-uroot-pmysql # 1st mysql commands are run, and 2nd mysql commands are run on the mysql console: g
When the server is not running php or installedPhpmyadminRemote ManagementMysqlIt seems necessary. Because it is set under CentOS, the title is added with CentOS. the following commands should also be OK in debian and other systems.
Mysql-u root-p mysql # 1st mysql is the execution command, and 2nd mysql is the system data name
Run the following command on the mysql console:
Grant all privileges on *. * to 'root' @ '%' identified by '000000' with grant option;
# The root account is the user name, and % represents any host. the logon password specified by '123456' (this password can be set different from the local root password without affecting each other)
Flush privileges; # reload system permissions
Exit;
Allow port 3306
Iptables-I INPUT-p tcp-m state -- state NEW-m tcp -- dport 3306-j ACCEPT
# Check whether the rule takes effect
Iptables-L-n # OR: service iptables status
# The production environment is insecure at this time. after remote management, close the port and delete the previously added rules.
Iptables-d input-p tcp-m state -- state NEW-m tcp -- dport 3306-j ACCEPT
PS. the above iptables add/delete rules are temporary. if the rules take effect after restart, save the changes:
Service iptables save # OR:/etc/init. d/iptables save
In addition,
Vi/etc/sysconfig/iptables # add the following rule.
-A input-p tcp-m state -- state NEW-m tcp -- dport 3306-jACCEPT
SQLyog can be used in win system for remote database management software. several remote software is used, which is quite good.