Log into MySQL and issue the following command as it is: SELECT table_schema AS “Database name”, SUM(data_length + index_length) / 1024 / 1024 AS “Size (MB)” FROM information_schema.TABLES GROUP BY table_schema; And you’ll get something like the following: +——————–+————–+ | Database name | Size (MB) | +——————–+————–+ | my_db1 |
Read moreBrowse our MySQL & MariaDB Database articles here. We’ve documented and provided tutorials on installing, managing, backing up, restoring and performance tuning databases.
Backup all MySQL databases into their own backup file
This is an example Bash script that will backup the MySQL databases on the local system. It will backup all databases except those called “Database”, “information_schema” and “mysql”. In other words, it will backup ‘your’ databases. Just remove those from the “egrep” command if you want all databases (including the
Read moreMySQL Database Replication Example
This article explains how to install MySQL 5.1 on Redhat/CentOS and configure replication to a slave MySQL server. In this article, the master host has the IP address “192.168.122.7” and the slave has IP address “192.168.122.6”. Remember to restart the MySQL server if and when you make changes to the
Read more