Calculate size of Mysql database with it's tables
So the size of the database is sum total of size of its individual tables.
Size of database = Sum of {Individual Table Size}
How to connect and execute query mysql database?
A very basic and essential snippet for any one starting with php and mysql database i.e. to connect to a given database, execute a custom sql and retrieve the results. The snippet can be modified to execute more than one query or execute an update or insert command instead of the query. The following snippet show exactly how to do so..
Check if Table Exists in a Database?
At times we want to find if a tables exists in a database.The snippet below shows how this can be done.
It open a db connection or reuse an already db connection, then selects the given database and finally executes a sql to find out whether the table exists or not.

