Useful MySQL Commands

Database with size SELECT table_schema “DB Name”, Round(Sum(data_length + index_length) / 1024 / 1024, 1) “DB Size in MB” FROM information_schema.tables GROUP BY table_schema; Create a database. mysql> create database [databasename]; List all databases on the server. mysql> show databases; Switch to a database. mysql> use [db name]; To see all the tables in the […]