MySQL8.0がDockerリポジトリーで提供されているので、Dockerに8.0のイメージをダウンロードしてインストールしてみました。
同時にMySQL8.0の新機能確認として、動的にGlobal Variablesを変更して永続化出来るか?また、データディクショナリの状況も確認してみました。
■ DockerレポジトリーとイメージTag
https://hub.docker.com/r/mysql/mysql-server/
https://hub.docker.com/r/mysql/mysql-server/tags/
MySQL8.0 Dockerイメージダウンロード~起動まで
[root@DockerHost oracle]# docker pull mysql/mysql-server:8.0 8.0: Pulling from mysql/mysql-server 7f369f1cac0b: Pull complete 897fddccf3d8: Pull complete 865c22dab1e4: Pull complete 3e61c960af44: Pull complete fcd95ea99f45: Pull complete e9cae96efb21: Pull complete 671450fab9a5: Pull complete 1b8291aef5a7: Pull complete 99ef814fb233: Pull complete c1add8e582f0: Pull complete Digest: sha256:c65b1da17c01749a28fc0b0865f94bf02053f290f23a28bf4fe9d8447dccadd6 Status: Downloaded newer image for mysql/mysql-server:8.0 [root@DockerHost oracle]# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE mysql/mysql-server 8.0 c1add8e582f0 5 days ago 393.4 MB mysql/mysql-server 5.7.12 4e1d42e32c43 5 months ago 296.7 MB mysql 5.7.10 ea0aca21950d 9 months ago 360.3 MB mysql/mysql-server 5.7.10 e472f1765697 9 months ago 294.6 MB [root@DockerHost oracle]# [root@DockerHost oracle]# docker run --name mysql8 -v /docker/docker8:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mysql -d mysql/mysql-server:8.0 f0d7a1a715633b76aaadbba8b8fa6a63b293a9a88d193d28cd44cebd33d08955 [root@DockerHost oracle]# [root@DockerHost oracle]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f0d7a1a71563 mysql/mysql-server:8.0 "/entrypoint.sh mysql" About a minute ago Up About a minute 3306/tcp, 33060/tcp mysql8 88da7fe02e00 mysql:5.7.10 "/entrypoint.sh mysql" 3 months ago Exited (0) 3 months ago my_docker03 4fde03dc4cb5 mysql/mysql-server:5.7.10 "/entrypoint.sh mysql" 8 months ago Exited (0) 3 months ago my_docker02 5152a22b2aa0 mysql:5.7.10 "/entrypoint.sh mysql" 8 months ago Exited (0) 8 months ago my_docker01 [root@DockerHost oracle]# [root@DockerHost oracle]# docker inspect -f "{{.Config.Hostname}}, {{.NetworkSettings.IPAddress}}" $(docker ps | grep -v "^CONTAINER" | awk '{print $1}') f0d7a1a71563, 172.17.0.2 [root@DockerHost oracle]#
ログインしてバージョン確認
[root@DockerHost oracle]# docker exec -it mysql8 mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 8.0.0-dmr MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select @@version; +-----------+ | @@version | +-----------+ | 8.0.0-dmr | +-----------+ 1 row in set (0.00 sec) mysql>
■ SET PERSIST Statementの確認
http://mysqlserverteam.com/mysql-8-0-persisting-configuration-variables/
mysql> SELECT * FROM performance_schema.variables_info WHERE variable_source != 'COMPILED'; +--------------------+-----------------+---------------+-----------+-----------+ | VARIABLE_NAME | VARIABLE_SOURCE | VARIABLE_PATH | MIN_VALUE | MAX_VALUE | +--------------------+-----------------+---------------+-----------+-----------+ | datadir | GLOBAL | /etc/my.cnf | 0 | 0 | | foreign_key_checks | DYNAMIC | | 0 | 0 | | log_error | GLOBAL | /etc/my.cnf | 0 | 0 | | pid_file | GLOBAL | /etc/my.cnf | 0 | 0 | | secure_file_priv | GLOBAL | /etc/my.cnf | 0 | 0 | | skip_name_resolve | GLOBAL | /etc/my.cnf | 0 | 0 | | socket | GLOBAL | /etc/my.cnf | 0 | 0 | +--------------------+-----------------+---------------+-----------+-----------+ 7 rows in set (0.00 sec) mysql> show variables like 'log_timestamps'; +----------------+-------+ | Variable_name | Value | +----------------+-------+ | log_timestamps | UTC | +----------------+-------+ 1 row in set (0.01 sec) mysql> SET PERSIST log_timestamps='SYSTEM'; Query OK, 0 rows affected (0.00 sec) mysql> show variables like 'log_timestamps'; +----------------+--------+ | Variable_name | Value | +----------------+--------+ | log_timestamps | SYSTEM | +----------------+--------+ 1 row in set (0.00 sec) mysql> SELECT * FROM performance_schema.variables_info WHERE variable_source != 'COMPILED'; +--------------------+-----------------+---------------+-----------+-----------+ | VARIABLE_NAME | VARIABLE_SOURCE | VARIABLE_PATH | MIN_VALUE | MAX_VALUE | +--------------------+-----------------+---------------+-----------+-----------+ | datadir | GLOBAL | /etc/my.cnf | 0 | 0 | | foreign_key_checks | DYNAMIC | | 0 | 0 | | log_error | GLOBAL | /etc/my.cnf | 0 | 0 | | log_timestamps | DYNAMIC | | 0 | 0 | | pid_file | GLOBAL | /etc/my.cnf | 0 | 0 | | secure_file_priv | GLOBAL | /etc/my.cnf | 0 | 0 | | skip_name_resolve | GLOBAL | /etc/my.cnf | 0 | 0 | | socket | GLOBAL | /etc/my.cnf | 0 | 0 | +--------------------+-----------------+---------------+-----------+-----------+ 8 rows in set (0.00 sec) mysql>
再起動後も値が反映されている事を確認
[root@DockerHost oracle]# docker stop f0d7a1a71563 f0d7a1a71563 [root@DockerHost oracle]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f0d7a1a71563 mysql/mysql-server:8.0 "/entrypoint.sh mysql" 11 minutes ago Exited (0) 2 seconds ago mysql8 88da7fe02e00 mysql:5.7.10 "/entrypoint.sh mysql" 3 months ago Exited (0) 3 months ago my_docker03 4fde03dc4cb5 mysql/mysql-server:5.7.10 "/entrypoint.sh mysql" 8 months ago Exited (0) 3 months ago my_docker02 5152a22b2aa0 mysql:5.7.10 "/entrypoint.sh mysql" 8 months ago Exited (0) 8 months ago my_docker01 [root@DockerHost oracle]# docker start f0d7a1a71563 f0d7a1a71563 [root@DockerHost oracle]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f0d7a1a71563 mysql/mysql-server:8.0 "/entrypoint.sh mysql" 11 minutes ago Up 2 seconds 3306/tcp, 33060/tcp mysql8 88da7fe02e00 mysql:5.7.10 "/entrypoint.sh mysql" 3 months ago Exited (0) 3 months ago my_docker03 4fde03dc4cb5 mysql/mysql-server:5.7.10 "/entrypoint.sh mysql" 8 months ago Exited (0) 3 months ago my_docker02 5152a22b2aa0 mysql:5.7.10 "/entrypoint.sh mysql" 8 months ago Exited (0) 8 months ago my_docker01 [root@DockerHost oracle]# [root@DockerHost oracle]# docker exec -it mysql8 mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 8.0.0-dmr MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show variables like 'log_timestamps'; +----------------+--------+ | Variable_name | Value | +----------------+--------+ | log_timestamps | SYSTEM | +----------------+--------+ 1 row in set (0.02 sec) mysql>
(補足) SET PERSISTで設定変更した、GLOBAL変数は以下のようにmysqld-auto.cnfから読み込まれています。
Under the hood the settings will be persisted to a file named mysqld-auto.cnf which will be created in the data directory.
This file will be read during server startup just like any other configuration file, and all variables present in this file will be applied as the highest priority.
That means the file mysqld-auto.cnf will be the last file to be applied on server startup (even after command-line options) and takes precedence if a specific setting has been specified in more than one location.
mysql> select VARIABLE_NAME,VARIABLE_SOURCE,VARIABLE_PATH from performance_schema.variables_info where VARIABLE_PATH <> ''; +-------------------+-----------------+--------------------------------+ | VARIABLE_NAME | VARIABLE_SOURCE | VARIABLE_PATH | +-------------------+-----------------+--------------------------------+ | datadir | GLOBAL | /etc/my.cnf | | log_error | GLOBAL | /etc/my.cnf | | log_timestamps | PERSISTED | /var/lib/mysql/mysqld-auto.cnf | | pid_file | GLOBAL | /etc/my.cnf | | secure_file_priv | GLOBAL | /etc/my.cnf | | skip_name_resolve | GLOBAL | /etc/my.cnf | | socket | GLOBAL | /etc/my.cnf | +-------------------+-----------------+--------------------------------+ 7 rows in set (0.00 sec) mysql>
■MySQL8.0データディクショナリの確認
[root@DockerHost var]# docker exec -it mysql8 mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.0-dmr MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> source /var/lib/mysql/init-docker-sakila.sql Query OK, 200 rows affected (0.01 sec) Records: 200 Duplicates: 0 Warnings: 0 Query OK, 603 rows affected (0.04 sec) Records: 603 Duplicates: 0 Warnings: 0 Query OK, 600 rows affected (0.01 sec) Records: 600 Duplicates: 0 Warnings: 0 <SNIP> Query OK, 109 rows affected (0.01 sec) Records: 109 Duplicates: 0 Warnings: 0 Query OK, 599 rows affected (0.04 sec) Records: 599 Duplicates: 0 Warnings: 0 Query OK, 1000 rows affected (0.17 sec) Records: 1000 Duplicates: 0 Warnings: 0 Query OK, 5462 rows affected (0.18 sec) Records: 5462 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sakila | | sys | +--------------------+ 5 rows in set (0.01 sec) mysql>
■ MySQL8.0で作成したSakilaサンプルデータベースのデータディクショナリー確認
[root@DockerHost sakila]# ls -l /docker/docker8/sakila total 25104 -rw-r----- 1 27 27 147456 Sep 20 13:55 actor.ibd -rw-r----- 1 27 27 278528 Sep 20 13:55 address.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 category.ibd -rw-r----- 1 27 27 147456 Sep 20 13:55 city.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 country.ibd -rw-r----- 1 27 27 229376 Sep 20 13:55 customer.ibd -rw-r----- 1 27 27 376832 Sep 20 13:55 film_actor.ibd -rw-r----- 1 27 27 180224 Sep 20 13:55 film_category.ibd -rw-r----- 1 27 27 376832 Sep 20 13:55 film.ibd -rw-r----- 1 27 27 294912 Sep 20 13:55 film_text.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_00000000000000ae_INDEX_1.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_00000000000000ae_INDEX_2.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_00000000000000ae_INDEX_3.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_00000000000000ae_INDEX_4.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_00000000000000ae_INDEX_5.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_00000000000000ae_INDEX_6.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_BEING_DELETED_CACHE.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_BEING_DELETED.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_CONFIG.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_DELETED_CACHE.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 FTS_000000000000005b_DELETED.ibd -rw-r----- 1 27 27 475136 Sep 20 13:56 inventory.ibd -rw-r----- 1 27 27 131072 Sep 20 13:55 language.ibd -rw-r----- 1 27 27 10485760 Sep 20 13:56 payment.ibd -rw-r----- 1 27 27 10485760 Sep 20 13:56 rental.ibd -rw-r----- 1 27 27 180224 Sep 20 13:55 staff.ibd -rw-r----- 1 27 27 163840 Sep 20 13:55 store.ibd [root@DockerHost sakila]#
■ MySQL5.7で作成したSakilaサンプルデータベースのデータディクショナリー確認
frmやTRGファイルが存在しています。
[root@DockerHost sakila]# ls -l /docker/docker03/sakila/ total 24620 -rw-r----- 1 999 999 8694 Jun 7 07:17 actor.frm -rw-r----- 1 999 999 114688 Jun 7 07:17 actor.ibd -rw-r----- 1 999 999 2863 Jun 7 07:17 actor_info.frm -rw-r----- 1 999 999 8878 Jun 7 07:17 address.frm -rw-r----- 1 999 999 245760 Jun 7 07:17 address.ibd -rw-r----- 1 999 999 8648 Jun 7 07:17 category.frm -rw-r----- 1 999 999 98304 Jun 7 07:17 category.ibd -rw-r----- 1 999 999 8682 Jun 7 07:17 city.frm -rw-r----- 1 999 999 114688 Jun 7 07:17 city.ibd -rw-r----- 1 999 999 8652 Jun 7 07:17 country.frm -rw-r----- 1 999 999 98304 Jun 7 07:17 country.ibd -rw-r----- 1 999 999 40 Jun 7 07:17 customer_create_date.TRN -rw-r----- 1 999 999 8890 Jun 7 07:17 customer.frm -rw-r----- 1 999 999 196608 Jun 7 07:17 customer.ibd -rw-r----- 1 999 999 1892 Jun 7 07:17 customer_list.frm -rw-r----- 1 999 999 300 Jun 7 07:17 customer.TRG -rw-r----- 1 999 999 61 Jun 7 07:17 db.opt -rw-r----- 1 999 999 36 Jun 7 07:17 del_film.TRN -rw-r----- 1 999 999 8648 Jun 7 07:17 film_actor.frm -rw-r----- 1 999 999 344064 Jun 7 07:17 film_actor.ibd -rw-r----- 1 999 999 8654 Jun 7 07:17 film_category.frm -rw-r----- 1 999 999 147456 Jun 7 07:17 film_category.ibd -rw-r----- 1 999 999 9188 Jun 7 07:17 film.frm -rw-r----- 1 999 999 344064 Jun 7 07:17 film.ibd -rw-r----- 1 999 999 2616 Jun 7 07:17 film_list.frm -rw-r----- 1 999 999 8642 Jun 7 07:17 film_text.frm -rw-r----- 1 999 999 262144 Jun 7 07:17 film_text.ibd -rw-r----- 1 999 999 1093 Jun 7 07:17 film.TRG -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_0000000000000045_INDEX_1.ibd -rw-r----- 1 999 999 131072 Jun 7 07:17 FTS_0000000000000035_0000000000000045_INDEX_2.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_0000000000000045_INDEX_3.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_0000000000000045_INDEX_4.ibd -rw-r----- 1 999 999 131072 Jun 7 07:17 FTS_0000000000000035_0000000000000045_INDEX_5.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_0000000000000045_INDEX_6.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_BEING_DELETED_CACHE.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_BEING_DELETED.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_CONFIG.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_DELETED_CACHE.ibd -rw-r----- 1 999 999 98304 Jun 7 07:17 FTS_0000000000000035_DELETED.ibd -rw-r----- 1 999 999 36 Jun 7 07:17 ins_film.TRN -rw-r----- 1 999 999 8694 Jun 7 07:17 inventory.frm -rw-r----- 1 999 999 442368 Jun 7 07:17 inventory.ibd -rw-r----- 1 999 999 8648 Jun 7 07:17 language.frm -rw-r----- 1 999 999 98304 Jun 7 07:17 language.ibd -rw-r----- 1 999 999 3234 Jun 7 07:17 nicer_but_slower_film_list.frm -rw-r----- 1 999 999 39 Jun 7 07:17 payment_date.TRN -rw-r----- 1 999 999 8818 Jun 7 07:17 payment.frm -rw-r----- 1 999 999 10485760 Jun 7 07:17 payment.ibd -rw-r----- 1 999 999 292 Jun 7 07:17 payment.TRG -rw-r----- 1 999 999 38 Jun 7 07:17 rental_date.TRN -rw-r----- 1 999 999 8830 Jun 7 07:17 rental.frm -rw-r----- 1 999 999 10485760 Jun 7 07:17 rental.ibd -rw-r----- 1 999 999 289 Jun 7 07:17 rental.TRG -rw-r----- 1 999 999 1669 Jun 7 07:17 sales_by_film_category.frm -rw-r----- 1 999 999 2344 Jun 7 07:17 sales_by_store.frm -rw-r----- 1 999 999 8952 Jun 7 07:17 staff.frm -rw-r----- 1 999 999 147456 Jun 7 07:17 staff.ibd -rw-r----- 1 999 999 1705 Jun 7 07:17 staff_list.frm -rw-r----- 1 999 999 8708 Jun 7 07:17 store.frm -rw-r----- 1 999 999 131072 Jun 7 07:17 store.ibd -rw-r----- 1 999 999 36 Jun 7 07:17 upd_film.TRN
メモ:MySQL8.0 DATA DICTIONARY
Data dictionary tables are invisible. They cannot be read with SELECT, do not appear in the output of SHOW TABLES,
are not listed in the INFORMATION_SCHEMA.TABLES table, and so forth. However, in most cases there are corresponding INFORMATION_SCHEMA tables
that can be queried. Conceptually, the INFORMATION_SCHEMA provides a view through which MySQL exposes data dictionary metadata.
For example, you cannot select from the mysql.schemata table directly:
http://dev.mysql.com/doc/refman/8.0/en/system-database.html#system-database-data-dictionary-tables
mysql> SELECT * FROM mysql.schemata; ERROR 3554 (HY000): Access to system table 'mysql.schemata' is rejected. mysql> mysql> SELECT * FROM INFORMATION_SCHEMA.SCHEMATA limit 10; +--------------+--------------------+----------------------------+------------------------+----------+ | CATALOG_NAME | SCHEMA_NAME | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME | SQL_PATH | +--------------+--------------------+----------------------------+------------------------+----------+ | def | mysql | latin1 | latin1_swedish_ci | NULL | | def | information_schema | utf8 | utf8_general_ci | NULL | | def | performance_schema | utf8 | utf8_general_ci | NULL | | def | sys | utf8 | utf8_general_ci | NULL | | def | sakila | latin1 | latin1_swedish_ci | NULL | +--------------+--------------------+----------------------------+------------------------+----------+ 5 rows in set (0.00 sec) mysql> select * from INNODB_SYS_TABLES where NAME LIKE 'sakila%'; +----------+------------------------------------------------------+------+--------+-------+------------+---------------+------------+ | TABLE_ID | NAME | FLAG | N_COLS | SPACE | ROW_FORMAT | ZIP_PAGE_SIZE | SPACE_TYPE | +----------+------------------------------------------------------+------+--------+-------+------------+---------------+------------+ | 97 | sakila/FTS_000000000000005b_00000000000000ae_INDEX_1 | 33 | 8 | 85 | Dynamic | 0 | Single | | 98 | sakila/FTS_000000000000005b_00000000000000ae_INDEX_2 | 33 | 8 | 86 | Dynamic | 0 | Single | | 99 | sakila/FTS_000000000000005b_00000000000000ae_INDEX_3 | 33 | 8 | 87 | Dynamic | 0 | Single | | 100 | sakila/FTS_000000000000005b_00000000000000ae_INDEX_4 | 33 | 8 | 88 | Dynamic | 0 | Single | | 101 | sakila/FTS_000000000000005b_00000000000000ae_INDEX_5 | 33 | 8 | 89 | Dynamic | 0 | Single | | 102 | sakila/FTS_000000000000005b_00000000000000ae_INDEX_6 | 33 | 8 | 90 | Dynamic | 0 | Single | | 92 | sakila/FTS_000000000000005b_BEING_DELETED | 33 | 4 | 80 | Dynamic | 0 | Single | | 93 | sakila/FTS_000000000000005b_BEING_DELETED_CACHE | 33 | 4 | 81 | Dynamic | 0 | Single | | 94 | sakila/FTS_000000000000005b_CONFIG | 33 | 5 | 82 | Dynamic | 0 | Single | | 95 | sakila/FTS_000000000000005b_DELETED | 33 | 4 | 83 | Dynamic | 0 | Single | | 96 | sakila/FTS_000000000000005b_DELETED_CACHE | 33 | 4 | 84 | Dynamic | 0 | Single | | 109 | sakila/OPC | 33 | 4 | 100 | Dynamic | 0 | Single | | 82 | sakila/actor | 33 | 7 | 70 | Dynamic | 0 | Single | | 83 | sakila/address | 33 | 12 | 71 | Dynamic | 0 | Single | | 84 | sakila/category | 33 | 6 | 72 | Dynamic | 0 | Single | | 85 | sakila/city | 33 | 7 | 73 | Dynamic | 0 | Single | | 86 | sakila/country | 33 | 6 | 74 | Dynamic | 0 | Single | | 87 | sakila/customer | 33 | 12 | 75 | Dynamic | 0 | Single | | 88 | sakila/film | 33 | 16 | 76 | Dynamic | 0 | Single | | 89 | sakila/film_actor | 33 | 6 | 77 | Dynamic | 0 | Single | | 90 | sakila/film_category | 33 | 6 | 78 | Dynamic | 0 | Single | | 91 | sakila/film_text | 33 | 7 | 79 | Dynamic | 0 | Single | | 103 | sakila/inventory | 33 | 7 | 91 | Dynamic | 0 | Single | | 104 | sakila/language | 33 | 6 | 92 | Dynamic | 0 | Single | | 105 | sakila/payment | 33 | 10 | 93 | Dynamic | 0 | Single | | 106 | sakila/rental | 33 | 10 | 94 | Dynamic | 0 | Single | | 107 | sakila/staff | 33 | 14 | 95 | Dynamic | 0 | Single | | 108 | sakila/store | 33 | 7 | 96 | Dynamic | 0 | Single | +----------+------------------------------------------------------+------+--------+-------+------------+---------------+------------+ 28 rows in set (0.00 sec) mysql> select * from INNODB_SYS_DATAFILES limit 5; +-------+------------------------------+ | SPACE | PATH | +-------+------------------------------+ | 2 | ./mysql/version.ibd | | 3 | ./mysql/character_sets.ibd | | 4 | ./mysql/collations.ibd | | 5 | ./mysql/tablespaces.ibd | | 6 | ./mysql/tablespace_files.ibd | +-------+------------------------------+ 5 rows in set (0.01 sec) mysql>
■ 参照
15.6 Data Dictionary Usage Differences
The MySQL 8.0.0 Milestone Release is available