mysql [(none)]>grant super on db1.* to 'dtstack'@'%';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
--因为super权限是管理
级别的权限(super ,process,file),不能够指定某个数据库on 后面必须跟*.*
正确用法:
mysql [(none)]>grant super on *.* to 'dtstack'@'%';
Query OK, 0 rows affected (0.01 sec)
解释:
1.super权限可以使用change master to 语句
2.kill , mysqladmin kill kill_threads
3.purge binary logs
EG:
wjj@(www.dtstack.com) [(none)]>show binary logs;+------------------+-----------+| Log_name | File_size |+------------------+-----------+| mysql-bin.000004 | 120 || mysql-bin.000005 | 246432 || mysql-bin.000006 | 120 |+------------------+-----------+3 rows in set (0.00 sec)
mysql [(none)]>purge binary logs to 'mysql-bin.000005'; --解释:删除MySQLbinlog日志,删除
mysql-bin.000005之前的,不包括他本身
Query OK, 0 rows affected (0.03 sec
mysql [(none)]>show binary logs;
+------------------+-----------+| Log_name | File_size |+------------------+-----------+| mysql-bin.000005 | 246432 || mysql-bin.000006 | 120 |+------------------+-----------+
2 rows in set (0.00 sec
4.可以设置全局参数模式set global xx
5.mysqladmin debug 启动或禁用日志记录
6.有权限设置relad_only
7.连接数达到max_connections上限时无法创建连接时,拥有super权限的用户可以创建一个连接