Mysql Modify/revoke permissions

Source: Internet
Author: User

Mysql Modify/revoke permissions mysql for security, by default, can only log on locally, disable the remote login permission, if you need to log on remotely, perform the following configuration: www.2cto.com (1) log on to mysql: [password can be blank, but this is not secure] 1 mysql> grant all privileges on dbname. tbname to 'username' @ 'login ip' identified by 'Password' with grant option; 2 dbname = * indicates all databases 3 tbname = * indicates all tables 4 login ip = % indicates that any ip5password is empty, indicating that you can log on without a password (2) Update: 1 mysql> flush privileges (3) users can log on remotely and only perform specific operations: 1 mysql> grant select, insert, update, delete on *. * to 'root' @ 'IP' identified by "password"; (4) revoke permissions: www.2cto.com 01 mysql> revoke privileges on dbname [. tbname] from username; 02 privileges includes: 03 alter: modify Database Table 04 create: create new database or table 05 delete: delete table data 06 drop: delete database/table 07 index: Create/delete index 08 insert: Add Table Data 09 select: Query table data 10 update: update table data 11 all: allow any operation 12 usage: Allow login only

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.