MariaDB [toyu]> show datahases; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 10 Current database: toyu ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'datahases' at line 1 MariaDB [toyu]> show datahases; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'datahases' at line 1 MariaDB [toyu]> show databases; +--------------------+ | Database | +--------------------+ | ctetinker | | information_schema | | mysql | | performance_schema | | phpmyadmin | | swim | | test | | toyu | +--------------------+ 8 rows in set (0.004 sec) MariaDB [toyu]> SELECT DISTINCT u.user, u.password. u.host -> FROM mysql.user AS u -> WHERE u.host = 'localhost'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.host FROM mysql.user AS u WHERE u.host = 'localhost'' at line 1 MariaDB [toyu]> SELECT DISTINCT u.user, u.password, u.host -> FROM mysql.user AS u -> WHERE u.host = 'localhost'; +------+-------------------------------------------+-----------+ | User | Password | Host | +------+-------------------------------------------+-----------+ | demo | *C2D24DCA38E9E862098B85BF0AB35CAA52803797 | localhost | | pma | | localhost | | root | | localhost | | yue | *0BE23F42F79ABCFD46E7AF357A07122B6C495EA8 | localhost | +------+-------------------------------------------+-----------+ 4 rows in set (0.003 sec) MariaDB [toyu]> SELECT table_name, table_type, row_format, table_rows, avg_row_length -> FROM information_schema.tables -> WHERE table_schema = 'information_schema' -> ORDER BY table_name DESC; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 9 Current database: toyu +---------------------------------------+-------------+------------+------------+----------------+ | table_name | table_type | row_format | table_rows | avg_row_length | +---------------------------------------+-------------+------------+------------+----------------+ | VIEWS | SYSTEM VIEW | Page | NULL | 0 | | user_variables | SYSTEM VIEW | Fixed | NULL | 6630 | | USER_STATISTICS | SYSTEM VIEW | Fixed | NULL | 567 | | USER_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2314 | | TRIGGERS | SYSTEM VIEW | Page | NULL | 0 | | TABLE_STATISTICS | SYSTEM VIEW | Fixed | NULL | 1181 | | TABLE_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2700 | | TABLE_CONSTRAINTS | SYSTEM VIEW | Fixed | NULL | 2504 | | TABLESPACES | SYSTEM VIEW | Fixed | NULL | 6951 | | TABLES | SYSTEM VIEW | Fixed | NULL | 14841 | | SYSTEM_VARIABLES | SYSTEM VIEW | Page | NULL | 0 | | STATISTICS | SYSTEM VIEW | Fixed | NULL | 5753 | | SQL_FUNCTIONS | SYSTEM VIEW | Fixed | NULL | 194 | | SPATIAL_REF_SYS | SYSTEM VIEW | Fixed | NULL | 7691 | | SESSION_VARIABLES | SYSTEM VIEW | Fixed | NULL | 6340 | | SESSION_STATUS | SYSTEM VIEW | Fixed | NULL | 6340 | | SCHEMA_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2507 | | SCHEMATA | SYSTEM VIEW | Fixed | NULL | 3464 | | ROUTINES | SYSTEM VIEW | Page | NULL | 0 | | REFERENTIAL_CONSTRAINTS | SYSTEM VIEW | Fixed | NULL | 4814 | | PROFILING | SYSTEM VIEW | Fixed | NULL | 308 | | PROCESSLIST | SYSTEM VIEW | Page | NULL | 0 | | PLUGINS | SYSTEM VIEW | Page | NULL | 0 | | PARTITIONS | SYSTEM VIEW | Page | NULL | 0 | | PARAMETERS | SYSTEM VIEW | Page | NULL | 0 | | OPTIMIZER_TRACE | SYSTEM VIEW | Page | NULL | 0 | | KEY_COLUMN_USAGE | SYSTEM VIEW | Fixed | NULL | 4637 | | KEY_CACHES | SYSTEM VIEW | Fixed | NULL | 659 | | KEYWORDS | SYSTEM VIEW | Fixed | NULL | 194 | | INNODB_TRX | SYSTEM VIEW | Fixed | NULL | 4530 | | INNODB_TABLESPACES_SCRUBBING | SYSTEM VIEW | Fixed | NULL | 2020 | | INNODB_TABLESPACES_ENCRYPTION | SYSTEM VIEW | Fixed | NULL | 2012 | | INNODB_SYS_VIRTUAL | SYSTEM VIEW | Fixed | NULL | 17 | | INNODB_SYS_TABLESTATS | SYSTEM VIEW | Fixed | NULL | 1215 | | INNODB_SYS_TABLESPACES | SYSTEM VIEW | Fixed | NULL | 2102 | | INNODB_SYS_TABLES | SYSTEM VIEW | Fixed | NULL | 2060 | | INNODB_SYS_SEMAPHORE_WAITS | SYSTEM VIEW | Fixed | NULL | 60189 | | INNODB_SYS_INDEXES | SYSTEM VIEW | Fixed | NULL | 618 | | INNODB_SYS_FOREIGN_COLS | SYSTEM VIEW | Fixed | NULL | 1748 | | INNODB_SYS_FOREIGN | SYSTEM VIEW | Fixed | NULL | 1752 | | INNODB_SYS_FIELDS | SYSTEM VIEW | Fixed | NULL | 594 | | INNODB_SYS_DATAFILES | SYSTEM VIEW | Fixed | NULL | 12007 | | INNODB_SYS_COLUMNS | SYSTEM VIEW | Fixed | NULL | 610 | | INNODB_MUTEXES | SYSTEM VIEW | Fixed | NULL | 24017 | | INNODB_METRICS | SYSTEM VIEW | Fixed | NULL | 3003 | | INNODB_LOCK_WAITS | SYSTEM VIEW | Fixed | NULL | 599 | | INNODB_LOCKS | SYSTEM VIEW | Fixed | NULL | 31244 | | INNODB_FT_INDEX_TABLE | SYSTEM VIEW | Fixed | NULL | 1054 | | INNODB_FT_INDEX_CACHE | SYSTEM VIEW | Fixed | NULL | 1054 | | INNODB_FT_DELETED | SYSTEM VIEW | Fixed | NULL | 9 | | INNODB_FT_DEFAULT_STOPWORD | SYSTEM VIEW | Fixed | NULL | 56 | | INNODB_FT_CONFIG | SYSTEM VIEW | Fixed | NULL | 1163 | | INNODB_FT_BEING_DELETED | SYSTEM VIEW | Fixed | NULL | 9 | | INNODB_CMP_RESET | SYSTEM VIEW | Fixed | NULL | 25 | | INNODB_CMP_PER_INDEX_RESET | SYSTEM VIEW | Fixed | NULL | 1755 | | INNODB_CMP_PER_INDEX | SYSTEM VIEW | Fixed | NULL | 1755 | | INNODB_CMPMEM_RESET | SYSTEM VIEW | Fixed | NULL | 29 | | INNODB_CMPMEM | SYSTEM VIEW | Fixed | NULL | 29 | | INNODB_CMP | SYSTEM VIEW | Fixed | NULL | 25 | | INNODB_BUFFER_POOL_STATS | SYSTEM VIEW | Fixed | NULL | 257 | | INNODB_BUFFER_PAGE_LRU | SYSTEM VIEW | Fixed | NULL | 6669 | | INNODB_BUFFER_PAGE | SYSTEM VIEW | Fixed | NULL | 6852 | | INDEX_STATISTICS | SYSTEM VIEW | Fixed | NULL | 1743 | | GLOBAL_VARIABLES | SYSTEM VIEW | Fixed | NULL | 6340 | | GLOBAL_STATUS | SYSTEM VIEW | Fixed | NULL | 6340 | | GEOMETRY_COLUMNS | SYSTEM VIEW | Fixed | NULL | 4244 | | FILES | SYSTEM VIEW | Fixed | NULL | 4022 | | EVENTS | SYSTEM VIEW | Page | NULL | 0 | | ENGINES | SYSTEM VIEW | Fixed | NULL | 731 | | ENABLED_ROLES | SYSTEM VIEW | Fixed | NULL | 387 | | COLUMN_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2893 | | COLUMNS | SYSTEM VIEW | Page | NULL | 0 | | COLLATION_CHARACTER_SET_APPLICABILITY | SYSTEM VIEW | Fixed | NULL | 195 | | COLLATIONS | SYSTEM VIEW | Fixed | NULL | 231 | | CLIENT_STATISTICS | SYSTEM VIEW | Fixed | NULL | 386 | | CHECK_CONSTRAINTS | SYSTEM VIEW | Page | NULL | 0 | | CHARACTER_SETS | SYSTEM VIEW | Fixed | NULL | 384 | | APPLICABLE_ROLES | SYSTEM VIEW | Fixed | NULL | 979 | | ALL_PLUGINS | SYSTEM VIEW | Page | NULL | 0 | +---------------------------------------+-------------+------------+------------+----------------+ 79 rows in set (0.134 sec) MariaDB [toyu]> MariaDB [toyu]> SELECT table_name, table_type, row_format, table_rows, avg_row_length -> FROM information_schema.tables -> WHERE table_schema = 'toyu' -> ORDER BY table_name DESC; +------------+------------+------------+------------+----------------+ | table_name | table_type | row_format | table_rows | avg_row_length | +------------+------------+------------+------------+----------------+ | student | BASE TABLE | Dynamic | 11 | 1489 | | school | BASE TABLE | Dynamic | 4 | 4096 | | grade | BASE TABLE | Dynamic | 15 | 1092 | | faculty | BASE TABLE | Dynamic | 11 | 1489 | | enroll | BASE TABLE | Dynamic | 22 | 744 | | department | BASE TABLE | Dynamic | 7 | 2340 | | course | BASE TABLE | Dynamic | 11 | 1489 | | class | BASE TABLE | Dynamic | 14 | 1170 | +------------+------------+------------+------------+----------------+ 8 rows in set (0.030 sec) MariaDB [toyu]> SELECT * -> FROM information_schema.tables -> WHERE table_schema = 'toyu' -> ORDER BY table_name DESC; +---------------+--------------+------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------------+------------------+-----------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | ENGINE | VERSION | ROW_FORMAT | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | MAX_DATA_LENGTH | INDEX_LENGTH | DATA_FREE | AUTO_INCREMENT | CREATE_TIME | UPDATE_TIME | CHECK_TIME | TABLE_COLLATION | CHECKSUM | CREATE_OPTIONS | TABLE_COMMENT | MAX_INDEX_LENGTH | TEMPORARY | +---------------+--------------+------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------------+------------------+-----------+ | def | toyu | student | BASE TABLE | InnoDB | 11 | Dynamic | 11 | 1489 | 16384 | 0 | 49152 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | | def | toyu | school | BASE TABLE | InnoDB | 10 | Dynamic | 4 | 4096 | 16384 | 0 | 16384 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | | def | toyu | grade | BASE TABLE | InnoDB | 10 | Dynamic | 15 | 1092 | 16384 | 0 | 0 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | | def | toyu | faculty | BASE TABLE | InnoDB | 10 | Dynamic | 11 | 1489 | 16384 | 0 | 16384 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | | def | toyu | enroll | BASE TABLE | InnoDB | 10 | Dynamic | 22 | 744 | 16384 | 0 | 32768 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | | def | toyu | department | BASE TABLE | InnoDB | 10 | Dynamic | 7 | 2340 | 16384 | 0 | 32768 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | | def | toyu | course | BASE TABLE | InnoDB | 10 | Dynamic | 11 | 1489 | 16384 | 0 | 16384 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | | def | toyu | class | BASE TABLE | InnoDB | 10 | Dynamic | 14 | 1170 | 16384 | 0 | 32768 | 0 | NULL | 2025-02-26 13:15:38 | NULL | NULL | utf8mb4_general_ci | NULL | | | 0 | N | +---------------+--------------+------------+------------+--------+---------+------------+------------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------------+------------------+-----------+ 8 rows in set (0.002 sec) MariaDB [toyu]> SELECT table_schema, table_name, table_type, row_format, table_rows, avg_row_length -> FROM information_schema.tables -> WHERE table_schema = 'toyu' -> ORDER BY table_name DESC; +--------------+------------+------------+------------+------------+----------------+ | table_schema | table_name | table_type | row_format | table_rows | avg_row_length | +--------------+------------+------------+------------+------------+----------------+ | toyu | student | BASE TABLE | Dynamic | 11 | 1489 | | toyu | school | BASE TABLE | Dynamic | 4 | 4096 | | toyu | grade | BASE TABLE | Dynamic | 15 | 1092 | | toyu | faculty | BASE TABLE | Dynamic | 11 | 1489 | | toyu | enroll | BASE TABLE | Dynamic | 22 | 744 | | toyu | department | BASE TABLE | Dynamic | 7 | 2340 | | toyu | course | BASE TABLE | Dynamic | 11 | 1489 | | toyu | class | BASE TABLE | Dynamic | 14 | 1170 | +--------------+------------+------------+------------+------------+----------------+ 8 rows in set (0.002 sec) MariaDB [toyu]> SELECT table_schema, table_name, table_type, row_format, table_rows, avg_row_length -> FROM information_schema.tables -> ORDER BY table_name DESC; +--------------------+----------------------------------------------------+-------------+------------+------------+----------------+ | table_schema | table_name | table_type | row_format | table_rows | avg_row_length | +--------------------+----------------------------------------------------+-------------+------------+------------+----------------+ | swim | v_tasklist | BASE TABLE | Dynamic | 3 | 5461 | | swim | v_task | BASE TABLE | Dynamic | 6 | 2730 | | information_schema | VIEWS | SYSTEM VIEW | Page | NULL | 0 | | swim | venue | BASE TABLE | Dynamic | 3 | 5461 | | information_schema | user_variables | SYSTEM VIEW | Fixed | NULL | 6630 | | information_schema | USER_STATISTICS | SYSTEM VIEW | Fixed | NULL | 567 | | information_schema | USER_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2314 | | performance_schema | users | BASE TABLE | Fixed | 1000 | 0 | | mysql | user | VIEW | NULL | NULL | NULL | | information_schema | TRIGGERS | SYSTEM VIEW | Page | NULL | 0 | | mysql | transaction_registry | BASE TABLE | Dynamic | 0 | 0 | | mysql | time_zone_transition_type | BASE TABLE | Page | 0 | 0 | | mysql | time_zone_transition | BASE TABLE | Page | 0 | 0 | | mysql | time_zone_name | BASE TABLE | Page | 0 | 0 | | mysql | time_zone_leap_second | BASE TABLE | Page | 0 | 0 | | mysql | time_zone | BASE TABLE | Page | 0 | 0 | | performance_schema | threads | BASE TABLE | Dynamic | 1000 | 0 | | mysql | table_stats | BASE TABLE | Page | 0 | 0 | | information_schema | TABLE_STATISTICS | SYSTEM VIEW | Fixed | NULL | 1181 | | information_schema | TABLE_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2700 | | performance_schema | table_lock_waits_summary_by_table | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | table_io_waits_summary_by_table | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | table_io_waits_summary_by_index_usage | BASE TABLE | Dynamic | 1000 | 0 | | information_schema | TABLE_CONSTRAINTS | SYSTEM VIEW | Fixed | NULL | 2504 | | mysql | tables_priv | BASE TABLE | Page | 0 | 0 | | information_schema | TABLESPACES | SYSTEM VIEW | Fixed | NULL | 6951 | | information_schema | TABLES | SYSTEM VIEW | Fixed | NULL | 14841 | | information_schema | SYSTEM_VARIABLES | SYSTEM VIEW | Page | NULL | 0 | | swim | swimmer | BASE TABLE | Dynamic | 6 | 2730 | | toyu | student | BASE TABLE | Dynamic | 11 | 1489 | | information_schema | STATISTICS | SYSTEM VIEW | Fixed | NULL | 5753 | | information_schema | SQL_FUNCTIONS | SYSTEM VIEW | Fixed | NULL | 194 | | information_schema | SPATIAL_REF_SYS | SYSTEM VIEW | Fixed | NULL | 7691 | | performance_schema | socket_summary_by_instance | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | socket_summary_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | socket_instances | BASE TABLE | Dynamic | 1000 | 0 | | mysql | slow_log | BASE TABLE | Dynamic | 2 | 0 | | performance_schema | setup_timers | BASE TABLE | Dynamic | 4 | 0 | | performance_schema | setup_objects | BASE TABLE | Dynamic | 0 | 0 | | performance_schema | setup_instruments | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | setup_consumers | BASE TABLE | Dynamic | 12 | 0 | | performance_schema | setup_actors | BASE TABLE | Fixed | 0 | 0 | | information_schema | SESSION_VARIABLES | SYSTEM VIEW | Fixed | NULL | 6340 | | information_schema | SESSION_STATUS | SYSTEM VIEW | Fixed | NULL | 6340 | | performance_schema | session_connect_attrs | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | session_account_connect_attrs | BASE TABLE | Dynamic | 1000 | 0 | | mysql | servers | BASE TABLE | Page | 0 | 0 | | toyu | school | BASE TABLE | Dynamic | 4 | 4096 | | information_schema | SCHEMA_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2507 | | information_schema | SCHEMATA | SYSTEM VIEW | Fixed | NULL | 3464 | | performance_schema | rwlock_instances | BASE TABLE | Dynamic | 1000 | 0 | | information_schema | ROUTINES | SYSTEM VIEW | Page | NULL | 0 | | mysql | roles_mapping | BASE TABLE | Page | 0 | 0 | | information_schema | REFERENTIAL_CONSTRAINTS | SYSTEM VIEW | Fixed | NULL | 4814 | | mysql | proxies_priv | BASE TABLE | Page | 1 | 16384 | | information_schema | PROFILING | SYSTEM VIEW | Fixed | NULL | 308 | | mysql | procs_priv | BASE TABLE | Page | 0 | 0 | | information_schema | PROCESSLIST | SYSTEM VIEW | Page | NULL | 0 | | mysql | proc | BASE TABLE | Page | 6 | 2730 | | phpmyadmin | pma__users | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__usergroups | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__userconfig | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__tracking | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__table_uiprefs | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__table_info | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__table_coords | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__savedsearches | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__relation | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__recent | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__pdf_pages | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__navigationhiding | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__history | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__favorite | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__export_templates | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__designer_settings | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__column_info | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__central_columns | BASE TABLE | Dynamic | 0 | 0 | | phpmyadmin | pma__bookmark | BASE TABLE | Dynamic | 0 | 0 | | information_schema | PLUGINS | SYSTEM VIEW | Page | NULL | 0 | | mysql | plugin | BASE TABLE | Page | 0 | 0 | | performance_schema | performance_timers | BASE TABLE | Fixed | 5 | 0 | | information_schema | PARTITIONS | SYSTEM VIEW | Page | NULL | 0 | | swim | participation | BASE TABLE | Dynamic | 24 | 682 | | information_schema | PARAMETERS | SYSTEM VIEW | Page | NULL | 0 | | swim | othercaretaker | BASE TABLE | Dynamic | 6 | 2730 | | information_schema | OPTIMIZER_TRACE | SYSTEM VIEW | Page | NULL | 0 | | performance_schema | objects_summary_global_by_type | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | mutex_instances | BASE TABLE | Dynamic | 1000 | 0 | | swim | meet | BASE TABLE | Dynamic | 3 | 5461 | | swim | levelhistory | BASE TABLE | Dynamic | 14 | 1170 | | swim | level | BASE TABLE | Dynamic | 10 | 1638 | | information_schema | KEY_COLUMN_USAGE | SYSTEM VIEW | Fixed | NULL | 4637 | | information_schema | KEY_CACHES | SYSTEM VIEW | Fixed | NULL | 659 | | information_schema | KEYWORDS | SYSTEM VIEW | Fixed | NULL | 194 | | information_schema | INNODB_TRX | SYSTEM VIEW | Fixed | NULL | 4530 | | mysql | innodb_table_stats | BASE TABLE | Dynamic | 41 | 399 | | information_schema | INNODB_TABLESPACES_SCRUBBING | SYSTEM VIEW | Fixed | NULL | 2020 | | information_schema | INNODB_TABLESPACES_ENCRYPTION | SYSTEM VIEW | Fixed | NULL | 2012 | | information_schema | INNODB_SYS_VIRTUAL | SYSTEM VIEW | Fixed | NULL | 17 | | information_schema | INNODB_SYS_TABLESTATS | SYSTEM VIEW | Fixed | NULL | 1215 | | information_schema | INNODB_SYS_TABLESPACES | SYSTEM VIEW | Fixed | NULL | 2102 | | information_schema | INNODB_SYS_TABLES | SYSTEM VIEW | Fixed | NULL | 2060 | | information_schema | INNODB_SYS_SEMAPHORE_WAITS | SYSTEM VIEW | Fixed | NULL | 60189 | | information_schema | INNODB_SYS_INDEXES | SYSTEM VIEW | Fixed | NULL | 618 | | information_schema | INNODB_SYS_FOREIGN_COLS | SYSTEM VIEW | Fixed | NULL | 1748 | | information_schema | INNODB_SYS_FOREIGN | SYSTEM VIEW | Fixed | NULL | 1752 | | information_schema | INNODB_SYS_FIELDS | SYSTEM VIEW | Fixed | NULL | 594 | | information_schema | INNODB_SYS_DATAFILES | SYSTEM VIEW | Fixed | NULL | 12007 | | information_schema | INNODB_SYS_COLUMNS | SYSTEM VIEW | Fixed | NULL | 610 | | information_schema | INNODB_MUTEXES | SYSTEM VIEW | Fixed | NULL | 24017 | | information_schema | INNODB_METRICS | SYSTEM VIEW | Fixed | NULL | 3003 | | information_schema | INNODB_LOCK_WAITS | SYSTEM VIEW | Fixed | NULL | 599 | | information_schema | INNODB_LOCKS | SYSTEM VIEW | Fixed | NULL | 31244 | | mysql | innodb_index_stats | BASE TABLE | Dynamic | 270 | 303 | | information_schema | INNODB_FT_INDEX_TABLE | SYSTEM VIEW | Fixed | NULL | 1054 | | information_schema | INNODB_FT_INDEX_CACHE | SYSTEM VIEW | Fixed | NULL | 1054 | | information_schema | INNODB_FT_DELETED | SYSTEM VIEW | Fixed | NULL | 9 | | information_schema | INNODB_FT_DEFAULT_STOPWORD | SYSTEM VIEW | Fixed | NULL | 56 | | information_schema | INNODB_FT_CONFIG | SYSTEM VIEW | Fixed | NULL | 1163 | | information_schema | INNODB_FT_BEING_DELETED | SYSTEM VIEW | Fixed | NULL | 9 | | information_schema | INNODB_CMP_RESET | SYSTEM VIEW | Fixed | NULL | 25 | | information_schema | INNODB_CMP_PER_INDEX_RESET | SYSTEM VIEW | Fixed | NULL | 1755 | | information_schema | INNODB_CMP_PER_INDEX | SYSTEM VIEW | Fixed | NULL | 1755 | | information_schema | INNODB_CMPMEM_RESET | SYSTEM VIEW | Fixed | NULL | 29 | | information_schema | INNODB_CMPMEM | SYSTEM VIEW | Fixed | NULL | 29 | | information_schema | INNODB_CMP | SYSTEM VIEW | Fixed | NULL | 25 | | information_schema | INNODB_BUFFER_POOL_STATS | SYSTEM VIEW | Fixed | NULL | 257 | | information_schema | INNODB_BUFFER_PAGE_LRU | SYSTEM VIEW | Fixed | NULL | 6669 | | information_schema | INNODB_BUFFER_PAGE | SYSTEM VIEW | Fixed | NULL | 6852 | | mysql | index_stats | BASE TABLE | Page | 0 | 0 | | information_schema | INDEX_STATISTICS | SYSTEM VIEW | Fixed | NULL | 1743 | | performance_schema | host_cache | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | hosts | BASE TABLE | Fixed | 1000 | 0 | | mysql | help_topic | BASE TABLE | Page | 752 | 2146 | | mysql | help_relation | BASE TABLE | Page | 114 | 143 | | mysql | help_keyword | BASE TABLE | Page | 37 | 442 | | mysql | help_category | BASE TABLE | Page | 48 | 341 | | mysql | gtid_slave_pos | BASE TABLE | Dynamic | 0 | 0 | | toyu | grade | BASE TABLE | Dynamic | 15 | 1092 | | information_schema | GLOBAL_VARIABLES | SYSTEM VIEW | Fixed | NULL | 6340 | | information_schema | GLOBAL_STATUS | SYSTEM VIEW | Fixed | NULL | 6340 | | mysql | global_priv | BASE TABLE | Page | 9 | 1820 | | information_schema | GEOMETRY_COLUMNS | SYSTEM VIEW | Fixed | NULL | 4244 | | mysql | general_log | BASE TABLE | Dynamic | 2 | 0 | | mysql | func | BASE TABLE | Page | 0 | 0 | | performance_schema | file_summary_by_instance | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | file_summary_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | file_instances | BASE TABLE | Dynamic | 1000 | 0 | | information_schema | FILES | SYSTEM VIEW | Fixed | NULL | 4022 | | toyu | faculty | BASE TABLE | Dynamic | 11 | 1489 | | performance_schema | events_waits_summary_global_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_waits_summary_by_user_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_waits_summary_by_thread_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_waits_summary_by_instance | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_waits_summary_by_host_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_waits_summary_by_account_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_waits_history_long | BASE TABLE | Dynamic | 10000 | 0 | | performance_schema | events_waits_history | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_waits_current | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_summary_global_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_summary_by_user_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_summary_by_thread_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_summary_by_host_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_summary_by_digest | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_summary_by_account_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_history_long | BASE TABLE | Dynamic | 10000 | 0 | | performance_schema | events_statements_history | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_statements_current | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_stages_summary_global_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_stages_summary_by_user_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_stages_summary_by_thread_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_stages_summary_by_host_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_stages_summary_by_account_by_event_name | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_stages_history_long | BASE TABLE | Dynamic | 10000 | 0 | | performance_schema | events_stages_history | BASE TABLE | Dynamic | 1000 | 0 | | performance_schema | events_stages_current | BASE TABLE | Dynamic | 1000 | 0 | | information_schema | EVENTS | SYSTEM VIEW | Page | NULL | 0 | | mysql | event | BASE TABLE | Page | 0 | 0 | | swim | event | BASE TABLE | Dynamic | 11 | 1489 | | toyu | enroll | BASE TABLE | Dynamic | 22 | 744 | | information_schema | ENGINES | SYSTEM VIEW | Fixed | NULL | 731 | | information_schema | ENABLED_ROLES | SYSTEM VIEW | Fixed | NULL | 387 | | toyu | department | BASE TABLE | Dynamic | 7 | 2340 | | mysql | db | BASE TABLE | Page | 3 | 5461 | | toyu | course | BASE TABLE | Dynamic | 11 | 1489 | | performance_schema | cond_instances | BASE TABLE | Dynamic | 1000 | 0 | | swim | commitment | BASE TABLE | Dynamic | 13 | 1260 | | mysql | column_stats | BASE TABLE | Page | 0 | 0 | | information_schema | COLUMN_PRIVILEGES | SYSTEM VIEW | Fixed | NULL | 2893 | | mysql | columns_priv | BASE TABLE | Page | 0 | 0 | | information_schema | COLUMNS | SYSTEM VIEW | Page | NULL | 0 | | information_schema | COLLATION_CHARACTER_SET_APPLICABILITY | SYSTEM VIEW | Fixed | NULL | 195 | | information_schema | COLLATIONS | SYSTEM VIEW | Fixed | NULL | 231 | | swim | coach | BASE TABLE | Dynamic | 5 | 3276 | | information_schema | CLIENT_STATISTICS | SYSTEM VIEW | Fixed | NULL | 386 | | toyu | class | BASE TABLE | Dynamic | 14 | 1170 | | information_schema | CHECK_CONSTRAINTS | SYSTEM VIEW | Page | NULL | 0 | | information_schema | CHARACTER_SETS | SYSTEM VIEW | Fixed | NULL | 384 | | swim | caretaker | BASE TABLE | Dynamic | 6 | 2730 | | information_schema | APPLICABLE_ROLES | SYSTEM VIEW | Fixed | NULL | 979 | | information_schema | ALL_PLUGINS | SYSTEM VIEW | Page | NULL | 0 | | performance_schema | accounts | BASE TABLE | Fixed | 1000 | 0 | +--------------------+----------------------------------------------------+-------------+------------+------------+----------------+ 202 rows in set (0.298 sec) MariaDB [toyu]> SELECT table_schema, COUNT(table_name) AS `# tables` -> FROM information_schema.tables -> GROUP BY `# tables` DESC; ERROR 1056 (42000): Can't group on '# tables' MariaDB [toyu]> SELECT table_schema, COUNT(table_name) AS `# tables` -> FROM information_schema.tables -> GROUP BY table_schema -> ORDER BY `# tables` DESC; +--------------------+----------+ | table_schema | # tables | +--------------------+----------+ | information_schema | 79 | | performance_schema | 52 | | mysql | 31 | | phpmyadmin | 19 | | swim | 13 | | toyu | 8 | +--------------------+----------+ 6 rows in set (0.015 sec) MariaDB [toyu]> desc information_schema.REFERENTIAL_CONSTRAINTS; +---------------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------------------+--------------+------+-----+---------+-------+ | CONSTRAINT_CATALOG | varchar(512) | NO | | NULL | | | CONSTRAINT_SCHEMA | varchar(64) | NO | | NULL | | | CONSTRAINT_NAME | varchar(64) | NO | | NULL | | | UNIQUE_CONSTRAINT_CATALOG | varchar(512) | NO | | NULL | | | UNIQUE_CONSTRAINT_SCHEMA | varchar(64) | NO | | NULL | | | UNIQUE_CONSTRAINT_NAME | varchar(64) | YES | | NULL | | | MATCH_OPTION | varchar(64) | NO | | NULL | | | UPDATE_RULE | varchar(64) | NO | | NULL | | | DELETE_RULE | varchar(64) | NO | | NULL | | | TABLE_NAME | varchar(64) | NO | | NULL | | | REFERENCED_TABLE_NAME | varchar(64) | YES | | NULL | | +---------------------------+--------------+------+-----+---------+-------+ 11 rows in set (0.022 sec) MariaDB [toyu]> SELECT rc.* -> FROM information_schema.REFERENTIAL_CONSTRAINTS AS rc -> WHERE rc.CONSTRAINT_SCHEMA = 'toyu'; +--------------------+-------------------+--------------------------+---------------------------+--------------------------+------------------------+--------------+-------------+-------------+------------+-----------------------+ | CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME | UNIQUE_CONSTRAINT_CATALOG | UNIQUE_CONSTRAINT_SCHEMA | UNIQUE_CONSTRAINT_NAME | MATCH_OPTION | UPDATE_RULE | DELETE_RULE | TABLE_NAME | REFERENCED_TABLE_NAME | +--------------------+-------------------+--------------------------+---------------------------+--------------------------+------------------------+--------------+-------------+-------------+------------+-----------------------+ | def | toyu | Class_courseId_fk | def | toyu | PRIMARY | NONE | RESTRICT | CASCADE | class | course | | def | toyu | Class_facId_fk | def | toyu | PRIMARY | NONE | RESTRICT | CASCADE | class | faculty | | def | toyu | Course_deptCode_fk | def | toyu | PRIMARY | NONE | RESTRICT | RESTRICT | course | department | | def | toyu | Department_schoolCode_fk | def | toyu | PRIMARY | NONE | RESTRICT | RESTRICT | department | school | | def | toyu | Enroll_classNumber_fk | def | toyu | PRIMARY | NONE | RESTRICT | CASCADE | enroll | class | | def | toyu | Enroll_grade_fk | def | toyu | PRIMARY | NONE | RESTRICT | CASCADE | enroll | grade | | def | toyu | Enroll_stuId_fk | def | toyu | PRIMARY | NONE | RESTRICT | CASCADE | enroll | student | | def | toyu | Faculty_deptCode_fk | def | toyu | PRIMARY | NONE | RESTRICT | RESTRICT | faculty | department | | def | toyu | Student_advisor_fk | def | toyu | PRIMARY | NONE | RESTRICT | RESTRICT | student | faculty | | def | toyu | Student_major_fk | def | toyu | PRIMARY | NONE | RESTRICT | CASCADE | student | department | | def | toyu | Student_minor_fk | def | toyu | PRIMARY | NONE | RESTRICT | CASCADE | student | department | +--------------------+-------------------+--------------------------+---------------------------+--------------------------+------------------------+--------------+-------------+-------------+------------+-----------------------+ 11 rows in set (0.002 sec) MariaDB [toyu]> desc information_schema.INNODB_SYS_FOREIGN; +----------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+------------------+------+-----+---------+-------+ | ID | varchar(193) | NO | | NULL | | | FOR_NAME | varchar(193) | NO | | NULL | | | REF_NAME | varchar(193) | NO | | NULL | | | N_COLS | int(11) unsigned | NO | | NULL | | | TYPE | int(11) unsigned | NO | | NULL | | +----------+------------------+------+-----+---------+-------+ 5 rows in set (0.018 sec) MariaDB [toyu]> MariaDB [toyu]> WHERE rc.CONSTRAINT_SCHEMA = 'toyu'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE rc.CONSTRAINT_SCHEMA = 'toyu'' at line 1 MariaDB [toyu]> SELECT isf.* -> FROM information_schema.INNODB_SYS_FOREIGN AS isf; +----------------------------------+---------------------+-----------------+--------+------+ | ID | FOR_NAME | REF_NAME | N_COLS | TYPE | +----------------------------------+---------------------+-----------------+--------+------+ | swim/commitment_caretaker_fk | swim/commitment | swim/caretaker | 1 | 0 | | swim/commitment_coach_fk | swim/commitment | swim/coach | 1 | 0 | | swim/commitment_v_task_fk | swim/commitment | swim/v_task | 1 | 0 | | swim/event_level_fk | swim/event | swim/level | 1 | 0 | | swim/event_meet_fk | swim/event | swim/meet | 1 | 0 | | swim/levelhistory_level_fk | swim/levelhistory | swim/level | 1 | 0 | | swim/levelhistory_swimmer_fk | swim/levelhistory | swim/swimmer | 1 | 0 | | swim/meet_coach_fk | swim/meet | swim/coach | 1 | 0 | | swim/meet_venue_fk | swim/meet | swim/venue | 1 | 0 | | swim/othercaretaker_caretaker_fk | swim/othercaretaker | swim/caretaker | 1 | 0 | | swim/othercaretaker_swimmer_fk | swim/othercaretaker | swim/swimmer | 1 | 0 | | swim/participation_coach_fk | swim/participation | swim/coach | 1 | 0 | | swim/participation_event_fk | swim/participation | swim/event | 1 | 0 | | swim/participation_swimmer_fk | swim/participation | swim/swimmer | 1 | 0 | | swim/swimmer_caretaker_fk | swim/swimmer | swim/caretaker | 1 | 0 | | swim/swimmer_level_fk | swim/swimmer | swim/level | 1 | 0 | | swim/v_tasklist_meet_fk | swim/v_tasklist | swim/meet | 1 | 0 | | swim/v_task_v_tasklist_fk | swim/v_task | swim/v_tasklist | 1 | 0 | | toyu/Class_courseId_fk | toyu/class | toyu/course | 1 | 1 | | toyu/Class_facId_fk | toyu/class | toyu/faculty | 1 | 1 | | toyu/Course_deptCode_fk | toyu/course | toyu/department | 1 | 0 | | toyu/Department_schoolCode_fk | toyu/department | toyu/school | 1 | 0 | | toyu/Enroll_classNumber_fk | toyu/enroll | toyu/class | 1 | 1 | | toyu/Enroll_grade_fk | toyu/enroll | toyu/grade | 1 | 1 | | toyu/Enroll_stuId_fk | toyu/enroll | toyu/student | 1 | 1 | | toyu/Faculty_deptCode_fk | toyu/faculty | toyu/department | 1 | 0 | | toyu/Student_advisor_fk | toyu/student | toyu/faculty | 1 | 0 | | toyu/Student_major_fk | toyu/student | toyu/department | 1 | 1 | | toyu/Student_minor_fk | toyu/student | toyu/department | 1 | 1 | +----------------------------------+---------------------+-----------------+--------+------+ 29 rows in set (0.001 sec) MariaDB [toyu]> MariaDB [toyu]> SELECT * FROM information_schema.INNODB_SYS_FOREIGN_COLS; +----------------------------------+----------------+--------------+-----+ | ID | FOR_COL_NAME | REF_COL_NAME | POS | +----------------------------------+----------------+--------------+-----+ | swim/commitment_caretaker_fk | CT_Id | CT_Id | 0 | | swim/commitment_coach_fk | CommentCoachId | CoachId | 0 | | swim/commitment_v_task_fk | VT_Id | VT_Id | 0 | | swim/event_level_fk | LevelId | LevelId | 0 | | swim/event_meet_fk | MeetId | MeetId | 0 | | swim/levelhistory_level_fk | LevelId | LevelId | 0 | | swim/levelhistory_swimmer_fk | SwimmerId | SwimmerId | 0 | | swim/meet_coach_fk | CoachId | CoachId | 0 | | swim/meet_venue_fk | VenueId | VenueId | 0 | | swim/othercaretaker_caretaker_fk | CT_Id | CT_Id | 0 | | swim/othercaretaker_swimmer_fk | SwimmerId | SwimmerId | 0 | | swim/participation_coach_fk | CommentCoachId | CoachId | 0 | | swim/participation_event_fk | EventId | EventId | 0 | | swim/participation_swimmer_fk | SwimmerId | SwimmerId | 0 | | swim/swimmer_caretaker_fk | Main_CT_Id | CT_Id | 0 | | swim/swimmer_level_fk | CurrentLevelId | LevelId | 0 | | swim/v_tasklist_meet_fk | MeetId | MeetId | 0 | | swim/v_task_v_tasklist_fk | VTL_Id | VTL_Id | 0 | | toyu/Class_courseId_fk | courseId | courseId | 0 | | toyu/Class_facId_fk | facId | facId | 0 | | toyu/Course_deptCode_fk | rubric | deptCode | 0 | | toyu/Department_schoolCode_fk | schoolCode | schoolCode | 0 | | toyu/Enroll_classNumber_fk | classId | classId | 0 | | toyu/Enroll_grade_fk | grade | grade | 0 | | toyu/Enroll_stuId_fk | stuId | stuId | 0 | | toyu/Faculty_deptCode_fk | deptCode | deptCode | 0 | | toyu/Student_advisor_fk | advisor | facId | 0 | | toyu/Student_major_fk | major | deptCode | 0 | | toyu/Student_minor_fk | minor | deptCode | 0 | +----------------------------------+----------------+--------------+-----+ 29 rows in set (0.001 sec) MariaDB [toyu]> SELECT CONCAT (s.fname, ' ', s.lname) AS student, -> d.deptName, -> CONCAT(f.fname, ' ', f.lname) as advisor -> FROM student AS s LEFT JOIN department AS d -> ON (s.major = d.deptCode) -> LEFT JOIN faculty AS f -> ON (s.advisor = f.facId); ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 30 Current database: toyu +-----------------+------------------------------+--------------+ | student | deptName | advisor | +-----------------+------------------------------+--------------+ | Tony Hawk | Computer Science | Paul Smith | | Mary Hawk | Computer Science | Paul Smith | | David Hawk | Computer Science | Mary Tran | | Catherine Lim | Information Technology | NULL | | Larry Johnson | Information Technology | Deborah Gump | | Linda Johnson | Computer Information Systems | Daniel Kim | | Lillian Johnson | Computer Information Systems | Andrew Byre | | Ben Zico | NULL | NULL | | Bill Ching | Arts | NULL | | Linda King | Arts | Art Allister | | Cathy Johanson | NULL | Art Allister | +-----------------+------------------------------+--------------+ 11 rows in set (0.056 sec) MariaDB [toyu]>