Once we complete installation of MySQL instance on Linux server, we could see below 4 databases/schema in instance
mysql> show databases;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
we will discuss each with its features
1. mysql : This is system database, it has tables that stores information related required by MySQL server. These includes table related to grants, timezone,replication, help system, optimizer, log
Few daily used tables from mysql schema
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| backup_history |
| db |
| event |
| general_log |
| help_keyword |
| help_topic |
| innodb_index_stats |
| innodb_table_stats |
| tables_priv |
| time_zone |
| user |
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| backup_history |
| db |
| event |
| general_log |
| help_keyword |
| help_topic |
| innodb_index_stats |
| innodb_table_stats |
| tables_priv |
| time_zone |
| user |
+---------------------------+
2. performance_schema : this schema/database contains tables corresponds to performance data. It monitors server events, tables are present in-memory not on disk storage, its contents are populated at startup of instance and discarded at shutdown.
3. sys : This includes set of objects that help DBA or developer to interpret data collect by performance schema. It includes
- Views that summarize performance schema data into understandable form.
- Stored procs that perform operations likes performance schema configuration and reports
- Stored functions that queries performance schema
4. information_schema : it provides access to database metadata such as name, tables and its datatypes or access privileges
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_VARIABLES |
| PARAMETERS |
| PROCESSLIST |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| SESSION_STATUS |
| STATISTICS |
| TABLES |
| TABLESPACES |
| TRIGGERS |
| INNODB_SYS_DATAFILES |
| INNODB_BUFFER_POOL_STATS |
| INNODB_SYS_TABLESTATS |
+---------------------------------------+
+---------------------------------------+
| CHARACTER_SETS |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_VARIABLES |
| PARAMETERS |
| PROCESSLIST |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| SESSION_STATUS |
| STATISTICS |
| TABLES |
| TABLESPACES |
| TRIGGERS |
| INNODB_SYS_DATAFILES |
| INNODB_BUFFER_POOL_STATS |
| INNODB_SYS_TABLESTATS |
+---------------------------------------+