Create an account and Set permissions for mysql in Linux

Source: Internet
Author: User


In Linux, mysql creates accounts and permission settings. 1. permission granting Description: mysql is deployed on server A, and host B on the Intranet connects to server A through client tools for database operations, server A needs to grant host B the permission to operate mysql 1.1 to log on to mysql on server A. Assume that the mysql account on server A is root: mysql-u root-p, and then press enter to enter the password!
1.2 grant database operation permission to host B mysql> grant usage on *. * to username@192.168.0.1 identified by 'Password'; Note: grant the username@192.168.0.1 the permissions to use all databases and log on with the username account on host 192.168.0.1 with the password: password www.2cto.com mysql> grant all privileges on newdb. * to username@192.168.0.1; Description: Give the username@192.168.0.1 operation database newdb maximum permissions, on host 192.168.0.1 using username Account Login, no password example: mysql> grant all privileges on *. * to root@192.168.0.1 identified by '20140901'; Note: grant the root@192.168.0.1 the permissions to use all databases and log on with the root account on host 192.168.0.1 with the password: 1234562, remove account mysql> drop user root@192.168.0.1; Note: Remove account root, in this way, host 192.168.0.1 can no longer use the root user operation server A on the database author Language

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.