The Ubuntu deployment of MySQL cannot be remotely linked

Source: Internet
Author: User
Tags iptables

Ways to allow remote users to log in to access MySQL

To use the root user from any host, password: youpassword (your root password) to connect to the MySQL server:

# mysql-u Root-proot
Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' Youpassword ' with GRANT OPTION;

After the operation, remember to perform the following command refresh permissions

FLUSH Privileges

If you are still unable to link, such as:

Error message: Pymysql.err.OperationalError: (2003, "Can ' t connect to MySQL server on ' 192.168.0.102 ' ([Winerror 10061] because the target computer is actively rejecting , unable to connect. )")

Workaround: VIM/ETC/MYSQL/MYSQL.CONF.D/MYSQLD.CNF

If the suspicion is Iptables's problem,

Please use the following command

Iptables-p INPUT ACCEPT

Iptables-p OUTPUT ACCEPT

Temporarily open all ports

There's no command to close iptables on Ubuntu.

This method is only suitable for temporary testing

The Ubuntu deployment of MySQL cannot be remotely linked

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.