NameSilo

I've searched high and low...

Spaceship Spaceship
Watch
Impact
20
on how i can get the size of a mysql database in megabytes (or kilobytes)but i cant find it anywhere

anyone got any tips or advice?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Use SHOW TABLE STATUS;

This will give you a result set row (for all the tables in the database, if you don't specify which one with a FROM clause) with a whole bunch of columns:

Name
Type
Row_format
Rows
Avg_row_length
Data_length
Max_data_length
Index_length
Data_free
Auto_increment
Create_time
Update_time
Charset in MySQL 4.1+
Check_time
Create_options
Comment

Data_length is the size (in bytes) of the table data file.
 
0
•••
Also might care to look at the source of phpMyAdmin, I know when you view structure of a database you get a total size in kilobytes at the bottom right cell.
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back