The implementation of adding users and granting permissions under MySQL in Linux

Source: Internet
Author: User

1, in linux first login mysql:mysql-u root-p(prompt to enter the password, input can)

2. Select MySQL database: Usemysql.

Insert the user name and user password of the system in the MySQL table:

Insert into User (Host,user,password) VALUES ("localhost", "Your user name", Password ("Password you want to set"));

3, refresh the MySQL system related tables:flush privileges;

4. Add all permissions for the new user to the management database:

Grant all on database. Database tables (with * for all tables below the corresponding database) to user name ;


Memo:

Grant Select,insert,update,delete,create,drop on Vtdc.employee to [e-mail protected] identified by ' 123′;

Joe IP is 10.163.225 . The 123 to log in and VTDC corresponding table Employeeimplement Select,insert,update,delete,create,drop operation.

The IP address can be freely restricted, or no limit will be changed to *.

permissions are availableSelect,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,file14 Permissions, When you want all permissions to be changed directly to grant all privileges on .



The implementation of adding users and granting permissions under MySQL in Linux

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.