MYSQL

Calculate size of Mysql database with it's tables

Compute Mysql Table SizeBasically a database is a collection of tables.
So the size of the database is sum total of size of its individual tables.
Size of the table = Size of its Data + Size of its Indexes.
Size of database = Sum of {Individual Table Size}
The following script uses that above logic to compute the overall size of the database by computing the size of its individual tables. This can be used to understand why and where the database size is growing.

How to connect and execute query mysql database?

PHP MYSQL Database ScriptA 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?

Php SQL ScriptAt 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. 

Subscribe to Feed

Did you like this article? You can get the all the latest articles published at CreateWebSite4You in your email inbox by entering your email address below. Your address will only be used for mailing you the articles, and each one will include a link so you can unsubscribe at any time.

Enter your email address:

Check it Out

Check it out

Tags