Why would you want to get the size of all databases in my MySQL?
Reason for this could be many, in my case I wanted to make sure replication worked as expected, I wanted to see the size of my database be the same on all my MySQL servers similar al viagra. And also I was a little curious how big some of my databases was.
There’s not much to write on this matter, just thought somebody could use this query, I know I am going to use this query many times in the future again.
The query for showing databae sizes in MySQL
It’s one tiny query actually. Just fire up a mysql client – phpmyadmin, mysql in terminal or you can even do this in a script.
SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
| Database name | Size (MB) |
| information_schema | 0.15625000 |
| mysql | 1.12139893 |
| performance_schema | 0.00000000 |
| phpmyadmin | 0.04900742 |
4 rows in set (0.01 sec)
Mail Admin Tool (MAT) a management interface for ISPmail
5 (100%) 2 votes
ISPmail, what is that?
ISPmail is a really good guide made by Christoph Haas that you can find at Workaround.org. A short description of what it is:
A guide to help you setup an email server, with virus and spam scanning + pop3, IMAP and smtp support for mobile devices or emails clients like Thunderbird.
It also allows for multiple domain names on the same email server!
I followed the guide and made my own email server, but the lack of a management interface for administering the email accountance, domains and aliases was making me crazy, there was no easy way to do it so i decided to make my own tool for it.
Mail Admin Tool (MAT), what can it do?
It is designed to do one thing and one thing only. Simply making it easy to manage your domains, email account and aliases when running postfix with MySQL backend that you have made when following the ISPmail guide from workaround.org
It was made with the ISPmail guide in mind, and it should work right out of the box if you followed the guide. If not, then this tool is not for you.
You can even reset mail account passwords if your users lost them with just a few clicks, easy and painless!
Having your MySQL data on a separate partition is important, why?
Having your MySQL data on a separate partition is important because when your root partition fills up and no space is left, your system won’t be able to boot and might crash when running, you then have to boot from a recovery disk to remove files before you can boot on your normal system again.
This is critical for servers that you can’t allow to be down for an hour or two!
The solution is easy, you just move your MySQL data to a separate partition, and this problem won’t occur any longer, the only thing that happens when you run out of space, is that the MySQL can’t write any new data to the database, which is better than the entire system crashing and being unable to boot.
In this guide i will show you how to make the changes needed to get this problem resolved.