The actual running process of MySQL database permission settings

Source: Internet
Author: User

This article mainly tells you about the actual operation process of MySQL database permission settings. We all know that MySQL database permissions are generated with the development of MySQL Databases and are gradually paid attention, the following articles describe how to set MySQL database permissions.

Add the user's permission to access the MySQL database

 
 
  1. grant all on sonardb.* to sonar@'%' identified by '123456'; 

Sonardb: Database Name, which can be '*' to indicate all databases.

Sonar: Specifies the user name.

%: Indicates all remote machines. You can also specify the IP address of the remote machine.

Delete user access

 
 
  1. delete from user where user='sss' and host='localhost' ; 

Sss: user name.

Localhost: MySQL database access permission

 
 
  1. flush privileges ; 

Update the permission table.

Delete the user's MySQL database Permissions

 
 
  1. revoke all on *.* from sss@localhost ; 

The above content is an introduction to MySQL database permission settings. I hope you will find some gains.
 


The above content describes the MySQL database permission settings, hoping to help you in this regard.

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.