Commonly Used MySQL Commands.

Posted by om 20 January, 2009

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/Bookmark
Categories : MySQL Tags :

Comments

No comments yet.


Leave a comment

(required)

(required)