Create a remote login user in MySQL and authorize the actual operation

Source: Internet
Author: User

Do you have a headache in obtaining the actual operations for creating remote login users and granting permissions for MySQL? If this is the case, the following article will provide the actual solution. The following article mainly describes how to create and authorize remote login users for MySQL, the following is a detailed description of the relevant content.

Create a remote login user in MySQL and authorize the user:

 
 
  1. > grant all PRIVILEGES on discuz.* to ted@'123.123.123.123' identified by '123456'; 

The preceding statement grants all permissions of the discuz database to the ted user, allows the ted user to remotely log on to the IP address 123.123.123.123, and sets the ted user password to 123456.

The following describes all the parameters one by one:

All PRIVILEGES indicates that all permissions are granted to the specified user. Here, you can also replace it with a specific permission, such as select, insert, update, delete, create, and drop, separate specific permissions with commas.

Discuz. * Indicates the table to which the preceding Permission applies. discuz indicates the database, and * indicates all the tables. Therefore, we can infer that: authorize "*. * ", authorize all tables of a database to" database name. * ", grant permissions to a table in a database as" database name. table name ".

Ted indicates the user you want to authorize. This user can be an existing user or a non-existing user.

123.123.123.123 indicates the IP address that allows remote connection. If you want to restrict the IP address, set it to "%.

123456 is the user's password.

After the preceding statement is executed, the following statement can take effect immediately.

 
 
  1. > flush privileges;  

The above content is an introduction to the creation of remote login users for MySQL. I hope you will gain some benefits.

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.