Mysql adds users and grants various permissions. mysql grants permissions.

Source: Internet
Author: User

Mysql adds users and grants various permissions. mysql grants permissions.

Mysql> grant permission 1, permission 2 ,... Permission n on database name. Table name to user name @ user address identified by 'Connection password'; permission 1, permission 2 ,... Permission n indicates 14 permissions, including select, insert, update, delete, create, drop, index, alter, grant, references, reload, shutdown, process, and file. When permission 1, permission 2 ,... Permission n is replaced by all privileges or all, indicating that all permissions are granted to the user. When the database name. Table name is replaced by *. *, it grants the user the permission to operate all the tables in the database on the server. The user address can be localhost, IP address, machine name, or domain name. You can also use "%" to connect from any address. For example, mysql> grant select, insert, update, delete on *. * to user1 @ "%" Identified by "123" Assign user1 to users from all addresses to select, insert, update, delete, create, drop, and set the password to 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.