Remote connection to Linux server MySQL

Source: Internet
Author: User

I'm having a problem today. Unable to remotely link MySQL

Host ' XXX ' is not allowed to connect to this MySQL server solution/How to turn on MYSQ

Solve the first prompt question first
It turns out that no Telnet user was created in MySQL
Log in to MySQL
MySQL -uroot-p123456

How to turn on MySQL remote account-2) Create a remote login user and authorize
> Grant all privileges the test_db.* to [email protected]' 192.168.1.101 ' identified by ' 123456 ';

(in Baidu search ' IP ' will show the current local IP address)

The above statement indicates that all permissions to the TEST_DB database are granted to root, allowing the root user to remotely log on to the 192.168.1.101 IP and set the root user's password to 123456.


Then there's the firewall problem.
/etc/sysconfig/iptables
Add the following sentence
-j ACCEPT




Remote connection to Linux server MySQL

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.