MySQL Remote permissions settings method

Source: Internet
Author: User
Tags phpmyadmin


MySQL defaults to only local logins, and the following actions allow users to have remote permissions, taking root as an example.

in command state


First, allow users to log on at any IP, and have all the permissions of all databases:

Grant all privileges on *.* to "root" @ '% ' identified by ' password ' with Grant OPTION;

Allow the user to log on at the specified IP and have all the permissions of all databases:

Grant all privileges on *.* to "root" @ "198.252.96.8″identified by" password "with Grant OPTION;

Third, allow users to login at the specified IP, and have all libraries to specify permissions:

GRANT SELECT, INSERT, UPDATE, DELETE on *.* to "root" @ "198.252.96.8″identified by" password ";

Use the REVOKE command to reclaim permissions:

REVOKE all in phpally_db from Demo_user;

After the above command is executed, use the command flush privileges, and overload the authorization table before it takes effect.

MySQL user rights have the following categories

Global Administrative permissions

File: Read and write files on the MySQL server.
PROCESS: Displays or kills a service thread belonging to another user.
RELOAD: Overload access Control table, refresh log, etc.
SHUTDOWN: Turn off MySQL service.

Database/datasheet/data column permissions

Alter: Modifies existing data tables (for example, adding and removing columns) and indexes.
Create: Create a new database or table.
Delete: Deletes a table record.
Drop: Deletes a datasheet or database.
Index: Create or delete indexes.
INSERT: Add table record.
SELECT: Display and search table records.
Update: Updating table records.

Special permissions

All: Allow to do anything.
USAGE: Only login allowed.

Using phpMyAdmin to directly modify

phpMyAdmin's homepage is shown in the following illustration:


Second, create a user (how you have created a good user before, you can omit this step)

After you click the permissions shown in the previous illustration, you can see the following image:

Click on the "Add new user" connection to add a new database username
As shown in the following illustration:

third, permission settings
As shown in the following illustration:

Edit Hellen permissions for this user
As shown in the following illustration:

Adding users can also fill in the user's permissions, you can also add users to edit the user's permissions later

Reload Authorization table
After modifying user rights, you need to go back to phpMyAdmin's home page and reload the authorization
as shown in the following illustration:

Notice, We also need to open the remote port on the server Oh, if your MySQL is 6666 you have to open it in the firewall to enable access to it, or can not connect to the MySQL Oh.

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.