Ubuntu MySQL Remote connection problem solving method

Source: Internet
Author: User

Input mysql-uroot-p under the shell can be logged in, so the problem should be that MySQL does not allow root users to log on remotely, so by entering the following command:


  1. GRANT all privileges on * * to [e-mail protected] "%" identified by ' password ' with GRANT OPTION;
After restarting MySQL, the discovery is still not connected, so I think the firewall (UFW) or iptables disabled port 3306.    With service iptables stop and UFW status, you can see that the discovery is not a firewall or iptables problem, and that the 3306 port is listening by Netstat. After the exclusion of the above factors, and Google, found that the problem appears in MySQL configuration file my.cnf, through the following modifications, after restarting MySQL, successfully telnet, Opennebula successfully connected to the MySQL database.

  1. sudo vim/etc/mysql/my.cnf
  2. Find the following and comment
  3. Bind-address = 127.0.0.1

Comment out bind-address = 127.0.0.1 and restart MySQL (service mysql restart)!

Ubuntu MySQL Remote connection problem solving method

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.