13.4 MySQL user management 13.5 Common SQL statements 13.6 MySQL database backup recovery

Source: Internet
Author: User

13.4 MySQL User management
  1. Grant all on . to ' user1 ' identified by ' passwd ';
    Mysql> Grant all on . to ' user1 ' identified by ' passwd ';
    Query OK, 0 rows affected (0.01 sec)

  2. Grant Select,update,insert on DB1. To ' user2 ' @ ' 192.168.15.132 ' identified by ' passwd ';
    Mysql> mysql> Grant Select,update,insert on DB1.
    To ' user2 ' @ ' 192.168.15.132 ' identtified by ' passwd ';
    Query OK, 0 rows affected (0.03 sec)

  3. Grant all on DB1. To ' user3 ' @ '% ' of ' identified by ' passwd ';
    Mysql> Grant all on DB1.
    To ' user3 ' @ '% ' of ' identified by ' passwd ';
    Query OK, 0 rows affected (0.01 sec)

  4. Show grants;
    Mysql> show Grants\g;
    1. Row
    Grants for [email protected]: GRANT all privileges on . To ' root ' @ ' localhost ' identified by PASSWORD ' *617636C103DE2F02681E9CB9DD2418DD4000DF30 ' with GRANT OPTION
    2. Row
    Grants for [email protected]: GRANT PROXY on "@" to "root" @ ' localhost ' with GRANT OPTION
    2 rows in set (0.01 SEC)

  5. Show grants for [email protected]

    Mysql> Show grants for [email protected];
    +-------------------------------------------------------------------------------------------------------------- -----+
    | Grants for [email protected] |
    +-------------------------------------------------------------------------------------------------------------- -----+
    | GRANT USAGE on . To ' user2 ' @ ' 192.168.15.132 ' identified by PASSWORD '59c70da2f3e3a5bdf46b68f5c8b8f25762bccef0 ' |
    | GRANT SELECT, INSERT, UPDATE on db1 .
    To ' user2 ' @ ' 192.168.15.132 ' |
    +-------------------------------------------------------------------------------------------------------------- -----+
    2 rows in Set (0.00 sec)

13.5 Common SQL statements

13.6 MySQL Database backup recovery


13.4 MySQL user management 13.5 Common SQL statements 13.6 MySQL database backup recovery

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.