I've been looking for a answer for this for some time but no luck. Does anyone know how do I check if the mysql db is full? I'll trigger an email in PHP to myself if the db is full cos I cannot check it constantly manually.
Thanks
I've been looking for a answer for this for some time but no luck. Does anyone know how do I check if the mysql db is full? I'll trigger an email in PHP to myself if the db is full cos I cannot check it constantly manually.
Thanks
check the disc-space on your server?
Website is running on shared hosting. I need a PHP script to check my own database space.
Now exactly what I wanted but still good to know about it.
I need something like this:
1) if('out of space' == mysql_error($link))
2) if(10 == mysql_error($link))
3) if(true == mysql_error('out of space'))
4) if(... whatever ....)
5) if(1024 == mysql_errno($link))
{
echo 'DB is out of space';
}
switch( mysql_errno($link) ) {
case 1021:
// handle ER_DISK_FULL
break;
case 1041:
// handle ER_OUT_OF_RESOURCES
break
...
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.