阿里云、AWS 、Azure云的比较
MySQL数据库:
和原生的MySQL实例相比,AWS多了部分rds开头的表
和原生的MySQL实例相比,阿里没有隐藏表,但是user和db表无法直接访问,但是提供了视图
和原生的MySQL实例相比,Azure China mysql库隐藏了很多的表,比如 user slow_log
和原生的MySQL实例相比,Azure 全球 mysql库没有隐藏表,和原生实例一致
information_schema数据库:
和原生的MySQL实例相比,阿里多了一些表
和原生的MySQL实例相比,AWS中国多了2张表,AWS全球和原生实例一致
和原生的MySQL实例相比,Azure China 和原生实例一致
和原生的MySQL实例相比,Azure 全球和原生实例一致
视图:
和原生的MySQL实例相比,阿里多了3张视图: db_view,slow_log_view,user_view,Azure和AWS都没有
存储过程:
和原生的MySQL实例相比,阿里没有提供存储过程,和源实例保持一致,不能通过命令行做主从,只能通过界面完成
和原生的MySQL实例相比,AWS中国和全球都提供了
mysql> select db,name from mysql.proc ;
+-------+-----------------------------------+
| db | name |
+-------+-----------------------------------+
| mysql | rds_collect_global_status_history |
| mysql | rds_disable_gsh_collector |
| mysql | rds_disable_gsh_rotation |
| mysql | rds_enable_gsh_collector |
| mysql | rds_enable_gsh_rotation |
| mysql | rds_external_master |
| mysql | rds_innodb_buffer_pool_dump_now |
| mysql | rds_innodb_buffer_pool_load_abort |
| mysql | rds_innodb_buffer_pool_load_now |
| mysql | rds_kill |
| mysql | rds_kill_query |
| mysql | rds_next_master_log |
| mysql | rds_reset_external_master |
| mysql | rds_rotate_general_log |
| mysql | rds_rotate_global_status_history |
| mysql | rds_rotate_slow_log |
| mysql | rds_set_configuration |
| mysql | rds_set_external_master |
| mysql | rds_set_fk_checks_off |
| mysql | rds_set_fk_checks_on |
| mysql | rds_set_gsh_collector |
| mysql | rds_set_gsh_rotation |
| mysql | rds_show_configuration |
| mysql | rds_skip_repl_error |
| mysql | rds_start_replication |
| mysql | rds_stop_replication |
+-------+-----------------------------------+
和原生的MySQL实例相比,Azure 全球:
mysql> select db,name from mysql.proc ;
+-------+--------------------------------------+
| db | name |
+-------+--------------------------------------+
| mysql | az_add_action_history |
| mysql | az_kill |
| mysql | az_kill_query |
| mysql | az_replication_change_primary |
| mysql | az_replication_remove_primary |
| mysql | az_replication_skip_counter |
| mysql | az_replication_start |
| mysql | az_replication_stop |
| mysql | az_update_replica_information |
| mysql | sp_delete_firewall_rule |
| mysql | sp_set_firewall_rule |
| mysql | sp_upgrade_firewall_rule |
| mysql | sp_upgrade_replica_information_table |
+-------+--------------------------------------+
13 rows in set (0.20 sec)
和原生的MySQL实例相比,Azure中国:
mysql> select db,name from mysql.proc ;
+-------+---------------+
| db | name |
+-------+---------------+
| mysql | az_kill |
| mysql | az_kill_query |
+-------+---------------+
2 rows in set (0.03 sec)
超级用户权限:
AWS:
mysql> show grants for rdsadmin@'localhost'; --rdsadmin、rdsrepladmin不能给客户登陆
+-------------------------------------------------------------------------+
| Grants for rdsadmin@localhost |
+-------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'rdsadmin'@'localhost' WITH GRANT OPTION |
+-------------------------------------------------------------------------+
1 row in set (0.01 sec)
mysql> show grants for root@'%';
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@% |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'root'@'%' WITH GRANT OPTION |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
阿里云:
mysql> show grants for dgmgr@'%';
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for dgmgr@% |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'dgmgr'@'%' IDENTIFIED BY PASSWORD '*EDA6751208D446E439315FB4F98712EF267C39FC' WITH GRANT OPTION |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.17 sec)
Azure 全球:
mysql> show grants for dbmgr@'%';
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for dbmgr@% |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'dbmgr'@'%' IDENTIFIED BY PASSWORD <secret> WITH GRANT OPTION |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.20 sec)
Azure 中国:
mysql> show grants for dbmgr@'%';
+---------------------------------------------------------------------------+
| Grants for dbmgr@% |
+---------------------------------------------------------------------------+
| GRANT RELOAD, REPLICATION CLIENT ON *.* TO 'dbmgr'@'%' |
| GRANT SELECT ON `performance_schema`.* TO 'dbmgr'@'%' |
| GRANT ALL PRIVILEGES ON `pro_skypixel`.* TO 'dbmgr'@'%' WITH GRANT OPTION |
| GRANT SELECT ON `mysql`.`time_zone` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`proc` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`func` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`event` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`help_category` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`help_relation` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`time_zone_transition` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`help_keyword` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`time_zone_transition_type` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`help_topic` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`time_zone_leap_second` TO 'dbmgr'@'%' |
| GRANT SELECT ON `mysql`.`time_zone_name` TO 'dbmgr'@'%' |
+---------------------------------------------------------------------------+
15 rows in set (0.03 sec)
https://dev.mysql.com/doc/refman/5.7/en/privileges-provided.html#priv_all
MySQL的Super权限能干什么?super权限是包含在ALL里面的
比较重要的功能限制有:
1、change master to
2、set binlog_format,sql_log_bin,sql_log_off
3、purge binary logs ,执行一些binlog相关的语句
RELOAD权限能执行 flush-logs flush-hosts的操作
PROCESS权限能show processlist 和查看information_schema
REFERENCES 可以创建外键
EXECUTE 执行权限
重要的参数对比:
log_bin :
Azure中国开log_bin;Azure全球区默认不打开log_bin ,阿里和AWS都是开的