Tag MySQL

Size of tables of a MySQL database

Query to show the size of the tables of a MySQL database. The output would be in MB and sorted in descending order. SELECT table_schema as `Database`, table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in…

MySQL Backup and Restore

mysqldump is a command line utility used to perform logical backup of MySQL databases. mysqldump backs up schema objects and data. Backup Database  Syntax: mysqldump -h hostname -u username -p databasename > Example: mysqldump -h localhost -u dbadmin -p…