Commonly Used MySQL Commands.

To login from linux shell
Mysql>;  -h hostname -u root -p

List all available databases with that username.
Show databases;

To use a database –
Use dbname;

To see tables within selected database;
show tables;

To see table field formats;
describe [xyzTableName];

To delete database –
Drop database [xyzDatabase];

To delete a table –

Drop table [xyzTableName];

Show all data in a table –
SELECT * FROM  xyzTableName;

Share

Leave a Reply

Your email address will not be published. Required fields are marked *