Mysql user authorization, database permission management, SQL syntax details, mysql permission management

Source: Internet
Author: User

Mysql user authorization, database permission management, SQL syntax details, mysql permission management

Mysql user authorization, database permission management, and SQL syntax-NiceCui

 

1. Authorize the primary SQL // ALL permissions of a database after ALL + PRIVILEGESGRANT ALL PRIVILEGES ON db_permit. * TO 'dev' @ '%' identified by 'yqwzh3e77srrpkms '; // No database permission for a specific database -*. * GRANT select, update, insert, delete ON db_permit. * TO 'dev' @ '%' identified by 'yqwzh3e77srrpkms '; // detailed description of authorization syntax SQL-GRANT-permission-ON 1. database Name. table Name (all *) 2. all databases *. * TO 'username' @ 'allowed ip addresses (all %) 'identified by 'user password'; 2: Other // permission refresh-after each permission adjustment, you usually need to execute the following statement to refresh the permission: flush privileges; // display the show grants authorization; // remove the authorized evke all privileges on *. * (Database Name or '*'-indicates all) FROM 'username '@ 'IP'; // Delete the created user drop user username @ localhost; // rename the user-'%' indicates all ipRENAME user' old Username '@' % 'to 'new name' @' % '; // change the password set password for 'username' @ 'IP' = PASSWORD ('123 ');

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.