MySQL allows remote login

Source: Internet
Author: User

Reference: http://blog.chinaunix.net/uid-23215128-id-2951624.html

1. Log in as root account

2.grant all privileges in discuz.* to [e-mail protected] ' 10.110.1.100 ' identified by ' 123456 ';

All privileges means giving all permissions to the specified user, which can also be replaced by assigning a specific permission, for example:select, Insert,update,delete,create,drop, and so on, with specific permissions between " , "half-width comma-delimited. Discuz. * Indicates which table the above permissions are for, discuz refers to the database, followed by * for all tables, it can be inferred that: for all of the database is authorized as "*. *" For all the tables, the entire table for a database is authorized as "database name. *" For a table in adatabase The "Database name. Table Name" is the right. Ted indicates which user you want to authorize, and this user can be either an existing user or a non-existent user.  123.123. 123.123 represents the IP address that allows remote connections, or "%" if you want to limit the IP of the link.  123456 The password for the user.

3. After executing the above statement, execute the following statement so that the authorization takes effect immediately.

CODE: [COPY]

> Flush Privileges;

Workaround:

1, change the table method:

It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from "localhost" to "%"

X:\>mysql-u Root-pvmware

mysql> use MySQL;
mysql> Update user Set host = '% ' where user = ' root ';
Mysql> Select Host, user from user;

Mysql> flush Privileges;

Note:mysql> flush privileges; Make the changes effective.

MySQL allows remote login

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.