Ubuntu 15.04 open MySQL remote connection

Source: Internet
Author: User

First see if the port is open Netstat-an|grep 3306

This figure is on port 3306, which was previously shown as ... 127.0.0.1:3306 ...


Open MySQL configuration file vi/etc/mysql/mysql.conf.d/mysqld.cnf

Log Off bind-address = 127.0.0.1?

Re-start Ubuntu

See if the port is open again Netstat-an|grep 3306

Port 3306 is now open

Then you can authorize access to MySQL using sudo

Command: sudo mysql-u root-p

Enter your password for the first time, and the second is the MySQL password


The root user is authorized to connect: Grant all privileges on * * to ' root ' @ '% ' identified by ' xxxxxx ';

Last one for MySQL password?

Get permission to take effect immediately: flush privileges;?


So the operation is complete and the MySQL database server can be connected to any host.

Ubuntu 15.04 open 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.