.
This commit is contained in:
10
Database/MySQL/Various SQL tips and tricks.sql
Normal file
10
Database/MySQL/Various SQL tips and tricks.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
SELECT table_schema "DB Name",
|
||||
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
|
||||
FROM information_schema.tables
|
||||
GROUP BY table_schema;
|
||||
|
||||
# List database variables
|
||||
SHOW VARIABLES;
|
||||
|
||||
# Get path where databases are stored
|
||||
SHOW VARIABLES LIKE 'datadir';
|
||||
Reference in New Issue
Block a user