Remote access permission to open MySQL database under Linux

Source: Internet
Author: User

Absrtact: Today installed on the Linux server MSYQL database, in the local access can be accessed, but I would like to access the remote way when it is not accessible, query data found that Linux under the default installation of MySQL is only local access permissions, no remote access permissions, You need to set access permissions for the specified user to access the database remotely, let me take a look at the following:

One: Log in to the MySQL database after installation, such as:

Two: Enter the command line to set permissions for the root user and enter, such as:

Here root for the root user, the last root represents the root user's password, I here user name, password is root, the middle of the% number for all IP address can be remote access, if you want to open remote access to a machine, then the% to which machine IP address, This is the only machine that can access the MySQL database under Linux remotely.

Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' root '; Mysql>flush Privileges

<textarea spellcheck="false" tabindex="0"></textarea>
Xxxxxxxxxx
2 1
 on ' root' @ '%' by' root ';
2
Mysql>flush Privileges




Remote access permission to open MySQL database under Linux

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.