13.4 mysql用户管理 13.5 常用sql语句 13.6 mysql数据库备份恢复

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了13.4 mysql用户管理 13.5 常用sql语句 13.6 mysql数据库备份恢复相关的知识,希望对你有一定的参考价值。

13.4 mysql用户管理

  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‘@‘%‘ identified by ‘passwd‘;
    mysql> grant all on db1.
    to ‘user3‘@‘%‘ 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 常用sql语句

技术分享图片

13.6 mysql数据库备份恢复

技术分享图片

技术分享图片
技术分享图片

以上是关于13.4 mysql用户管理 13.5 常用sql语句 13.6 mysql数据库备份恢复的主要内容,如果未能解决你的问题,请参考以下文章

13.4 mysql用户管理 13.5 常用sql语句 13.6 mysql数据库备份恢复

13.4 mysql用户管理 13.5 常用sql语句 13.6 mysql数据库备份恢复

2018-6-20

十三周五次课

2018.3.23 13周5次课

二十四节课预习