Linux Open MySQL remote connection

Source: Internet
Author: User

Linux to turn on MySQL remote connection setup steps.
MySQL remote connection linuxserviceserverusermysql default root user only local access, cannot remotely connect to manage MySQL database, Linux how to turn on MySQL remote connection? The setup steps are as follows:
1. Grant command to create a remote connection MySQL authorized user test
Mysql-u root-p
Mysql>grant all privileges on * * to [E- Mail protected] identified by ' test ' with GRANT OPTION;
Mysql>grant all privileges on * * to [E- Mail protected]"%" identified by ' test ' with GRANT OPTION;

The first sentence adds the Itlogger user authorization via Local machine (localhost) access, password ' test '. The second sentence is to grant the test user access from any other host (the wildcard%).
2. Set firewall to allow 3306 ports
Vi/etc/sysconfig/iptables
Add to
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 3306-j ACCEPT
(Note that the rule will not take effect until you add the-a rh-firewall-1-input-j REJECT--reject-with icmp-host-prohibited)
Restart Firewall service iptables restart

Linux to turn on MySQL remote connection

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.