• pt-show-grants的用法


    pt-show-grants的用法

    功能:导出授权sql

    [root@dbtest ~]# pt-show-grants h=10.192.30.60,u=admin_m,p="rA75MQy*R*y@KO4z%LZe"
    -- Grants dumped by pt-show-grants
    -- Dumped from server 10.192.30.60 via TCP/IP, MySQL 8.0.17 at 2019-08-15 16:12:29
    -- Grants for 'admin'@'%'
    CREATE USER IF NOT EXISTS 'admin'@'%';
    ALTER USER 'admin'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*7B4D2465633267417D4CED3BDC10BF6682FCD08D' REQUIRE NONE PASSWORD EXPIRE NEVER ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT;
    GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROLE, CREATE ROUTINE, CREATE TABLESPACE, CREATE TEMPORARY TABLES, CREATE USER, CREATE VIEW, DELETE, DROP, DROP ROLE, EVENT, EXECUTE, FILE, INDEX, INSERT, LOCK TABLES, PROCESS, REFERENCES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SELECT, SHOW DATABASES, SHOW VIEW, SHUTDOWN, SUPER, TRIGGER, UPDATE ON *.* TO `admin`@`%` WITH GRANT OPTION;
    GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `admin`@`%` WITH GRANT OPTION;
    -- Grants for 'admin_m'@'%'
    CREATE USER IF NOT EXISTS 'admin_m'@'%';
    ALTER USER 'admin_m'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*4D3B85DA157E12897777BC07328572F397617F7D' REQUIRE NONE PASSWORD EXPIRE NEVER ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT;
    GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROLE, CREATE ROUTINE, CREATE TABLESPACE, CREATE TEMPORARY TABLES, CREATE USER, CREATE VIEW, DELETE, DROP, DROP ROLE, EVENT, EXECUTE, FILE, INDEX, INSERT, LOCK TABLES, PROCESS, REFERENCES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SELECT, SHOW DATABASES, SHOW VIEW, SHUTDOWN, SUPER, TRIGGER, UPDATE ON *.* TO `admin_m`@`%` WITH GRANT OPTION;
    GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `admin_m`@`%` WITH GRANT OPTION;
    -- Grants for 'admin_m'@'127.0.0.1'
    CREATE USER IF NOT EXISTS 'admin_m'@'127.0.0.1';
    ALTER USER 'admin_m'@'127.0.0.1' IDENTIFIED WITH 'mysql_native_password' AS '*4D3B85DA157E12897777BC07328572F397617F7D' REQUIRE NONE PASSWORD EXPIRE NEVER ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT;
    GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROLE, CREATE ROUTINE, CREATE TABLESPACE, CREATE TEMPORARY TABLES, CREATE USER, CREATE VIEW, DELETE, DROP, DROP ROLE, EVENT, EXECUTE, FILE, INDEX, INSERT, LOCK TABLES, PROCESS, REFERENCES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SELECT, SHOW DATABASES, SHOW VIEW, SHUTDOWN, SUPER, TRIGGER, UPDATE ON *.* TO `admin_m`@`127.0.0.1` WITH GRANT OPTION;
    GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `admin_m`@`127.0.0.1` WITH GRANT OPTION;
    ......
    ......
    -- Grants for 'test_r'@'%'
    CREATE USER IF NOT EXISTS 'test_r'@'%';
    ALTER USER 'test_r'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*DC19EA8A5E9B43AFAA33B6B2E451DE56063FF178' REQUIRE NONE PASSWORD EXPIRE NEVER ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT;
    GRANT DELETE, INSERT, SELECT, UPDATE ON `db144`.* TO `test_r`@`%`;
    GRANT USAGE ON *.* TO `test_r`@`%`;
    -- Grants for 'test_w'@'%'
    CREATE USER IF NOT EXISTS 'test_w'@'%';
    ALTER USER 'test_w'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*B1E64B4A1D77FC68872C38AFE76523DDB756DA82' REQUIRE NONE PASSWORD EXPIRE NEVER ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT;
    GRANT DELETE, INSERT, SELECT, UPDATE ON `db144`.* TO `test_w`@`%`;
    GRANT USAGE ON *.* TO `test_w`@`%`;
    [root@dbtest ~]# 
  • 相关阅读:
    hdu 4609 (FFT求解三角形)
    hdu 1402 FFT(模板)
    是因为Session只能让服务器在一次连续的会话中记住你,而Cookie是记住浏览器一段时间
    应该是实例化对象的没有对属性赋值时,自动赋值为null,但不是空指针对象引用
    一共有三种方式获取表单中的信息.第三种,容易忽视..用动作获取和用内置对象获取
    是不是总会有好享受的时候
    获取表单提交的信息在jsp页面只能用request对象。活着用超链接的URL传递参数,但是同样用request对象来获取
    不能解决,复选框在request对象获取的信息后显示在用户信息里面为中文的选项名
    jsp中向浏览器页面输出的方式总结
    mysql
  • 原文地址:https://www.cnblogs.com/bjx2020/p/11358653.html
Copyright © 2020-2023  润新知