MySQL database set remote connection permissions

Source: Internet
Author: User
Tags mysql client

Original

Problem phenomenon

MySQL installation is complete, the local login is normal, enter the correct account password remote login connection times wrong as follows

Cause of the problem

Remote IP does not have login rights, the root user can only be in localhost, only in the local login, you need to set allow other IP logon rights.

Solution Solutions

1. Log in to the database inside the server, and then execute

This statement means that the root user can log in to the database at any IP and manipulate any object in any database.

which

* * The first * refers to a database

* Represents all databases

The second * refers to a database object

* represents all objects in the database

' Root ' @ '% ' root is the database user who is making the authorization

% for allowed IP login

123456 is your database password.

If you want to limit only in 1.1.1.1 login, the% changed to 1.1.1.1, executed after the implementation of flush privileges; Refresh Permissions

2. Then the MySQL client on the remote computer can connect.

MySQL database set remote connection permissions

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.