Linux MySQL Permissions

Source: Internet
Author: User

Original address: Http://www.cnblogs.com/eczhou/archive/2012/07/12/2588187.htmlLinux MySQL new account and permissions settings

1, permission to give

Description: MySQL is deployed on server A, and intranet Host B connects server A with client tools for database operations, requiring server A to give Host B permission to operate MySQL

1.1 Enter MySQL on Server A, assuming that the MySQL account on server A is root:

Mysql-u root-p

and enter the password!

1.2 Giving Host B permission to operate the database

Mysql> Grant Usage on * * to [e-mail protected] identified by ' password ';

Description: Give [email protected] permission to use all databases, log in using username account on host 192.168.0.1, password: password

Mysql> Grant Usage on *. * to username identified by ' password ';

Description: Give username permission to use all databases, log in with username account on all hosts, password: password

Mysql> grant all privileges in newdb.* to [email protected];

Description: Give [email protected] Operation database newdb the highest permissions, on the host 192.168.0.1 using username account login, no password

Example:

Mysql> Grant all privileges on * * to [e-mail protected] identified by ' 123456 ';

Description: Give [email protected] permission to use all databases, log in with the root account on host 192.168.0.1, password: 123456

2, remove the account

mysql> drop user [email protected];

Note: Remove the account root so that the host 192.168.0.1 can no longer use the root user to operate the database on Server A

Linux MySQL 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.