centos6.5 installation of MySQL, remote access

Source: Internet
Author: User
Tags iptables

Installation reference: Http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html, very detailed.

After the installation is successful, the configuration must be configured to access MySQL from another machine:

1. Open MySQL Access port 3306

Modify the firewall configuration file
Vi/etc/sysconfig/iptables

Join Port Configuration
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 6379-j ACCEPT

Reload Rule

Service Iptables Restart

2. Modify the host in the MySQL library

Log in to MySQL:

Use MySQL

Update user set host= '% ' where user= ' root ' and host= ' localhost ';

Remember must also change the password, because at this time the password is invalid, although the local can also be the original password to log in, can be remotely changed host or cannot access

UPDATE user SET Password=password ("root") WHERE user= ' root ';

Flush privileges;

3. Restart MySQL, remote access to the


PS: If it is not possible to log on locally due to Operation error, you can

Mysqld_safe--skip-grant-tables &

Way to start MySQL, where you can login MySQL without a password, and then start by normal mode




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

centos6.5 installation of MySQL, remote access

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.