Enable remote connection to MySQL under UbuntuServer

Source: Internet
Author: User
To enable the remote connection to MySQL under UbuntuServer, take two steps: the first step is to create a remote connection MySQL user mysql & gt; GRANTALLPRIVILEGESONremote. * TOremote @ "%" IDENTIFIEDBY "remotepwd"; the second step is to modify the mysql configuration file/etc/mysql/my. cnf $ & gt; sudovi

To enable remote connection to MySQL under Ubuntu Server, two steps are required:

The first step is to create a MySQL user that can be remotely connected

Mysql> grant all privileges on remote. * TO remote @ "%" identified by "remotepwd ";

Step 2: Modify the mysql configuration file/etc/mysql/my. cnf

$> Sudo vi/etc/mysql/my. cnf

In the old version, locate skip-networking and comment it out.
# Skip-networking

In the new version:
# Instead of skip-networking the default is now to listen only on
# Localhost which is more compatible and is not less secure.
Bind-address = 127.0.0.1

Bind-address = 127.0.0.1 must be commented out.
# Bind-address = 127.0.0.1

Or fill in the ip addresses that are allowed to access
# Bind-address = 192.168.1.100

Restart MySQL
$> Sudo/etc/init. d/mysql restart
* Starting MySQL database server mysqld
... Done.
* Checking for login upt, not cleanly closed and upgrade needing tables.
Andy @ ubuntu :~ $ Sudo/etc/init. d/mysql start
* Starting MySQL database server mysqld
... Done.

In this way, you can remotely access MySQL.

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.