MySQL 8.4 cheatsheet
MySQL 8.4: Inspecting the database
7 common MySQL 8.4 tasks.
Show the CREATE TABLE statement
Print the statement that would recreate a table, including indexes and constraints.
SHOW CREATE TABLE users;
Check database sizes
Add up data and index sizes for each database, in MB.
SELECT table_schema, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS size_mb FROM information_schema.tables GROUP BY table_schema;