mysql 8.0版本

#####################

默认身份验证插件配置:default_authentication_plugin

mysql> show global variables like  'default_authentication_plugin';
+-------------------------------+-----------------------+
| Variable_name                 | Value                 |
+-------------------------------+-----------------------+
| default_authentication_plugin | caching_sha2_password |
+-------------------------------+-----------------------+
1 row in set, 1 warning (0.00 sec)

mysql>

 

 

 

 

 

 

 

 

 

 

 #########################

查看某个库的所有表占用存储空间大小:

mysql> select table_name, (data_length+index_length)/1024/1024 as total_mb,table_rows from information_schema.tables where table_schema='mysql' order by total_mb desc;
+------------------------------------------------------+------------+------------+
| TABLE_NAME                                           | total_mb   | TABLE_ROWS |
+------------------------------------------------------+------------+------------+
| help_topic                                           | 1.60937500 |       1046 |
| help_keyword                                         | 0.25000000 |        885 |
| help_relation                                        | 0.09375000 |       2392 |
| innodb_index_stats                                   | 0.07812500 |        458 |
| global_grants                                        | 0.04687500 |         47 |
| proxies_priv                                         | 0.03125000 |          1 |
| db                                                   | 0.03125000 |          2 |
| replication_asynchronous_connection_failover         | 0.03125000 |          0 |
| procs_priv                                           | 0.03125000 |          0 |
| help_category                                        | 0.03125000 |         53 |
| replication_group_member_actions                     | 0.03125000 |          2 |
| tables_priv                                          | 0.03125000 |          2 |
| engine_cost                                          | 0.01562500 |          2 |
| func                                                 | 0.01562500 |          0 |
| gtid_executed                                        | 0.01562500 |          2 |
| innodb_table_stats                                   | 0.01562500 |         65 |
| password_history                                     | 0.01562500 |          0 |
| plugin                                               | 0.01562500 |          1 |
| columns_priv                                         | 0.01562500 |          0 |
| replication_asynchronous_connection_failover_managed | 0.01562500 |          0 |
| replication_group_configuration_version              | 0.01562500 |          1 |
| component                                            | 0.01562500 |          0 |
| role_edges                                           | 0.01562500 |          1 |
| server_cost                                          | 0.01562500 |          6 |
| servers                                              | 0.01562500 |          0 |
| slave_master_info                                    | 0.01562500 |          0 |
| slave_relay_log_info                                 | 0.01562500 |          0 |
| slave_worker_info                                    | 0.01562500 |          0 |
| default_roles                                        | 0.01562500 |          0 |
| time_zone                                            | 0.01562500 |          0 |
| time_zone_leap_second                                | 0.01562500 |          0 |
| time_zone_name                                       | 0.01562500 |          0 |
| time_zone_transition                                 | 0.01562500 |          0 |
| time_zone_transition_type                            | 0.01562500 |          0 |
| user                                                 | 0.01562500 |          7 |
| slow_log                                             | 0.00000000 |          2 |
| general_log                                          | 0.00000000 |          2 |
+------------------------------------------------------+------------+------------+
37 rows in set (0.06 sec)

 

 

########################

posted @ 2021-08-31 18:09  igoodful  阅读(58)  评论(0编辑  收藏  举报