MySQL Console Command
To login (from unix shell) use -h only if needed.
1 |
# [mysql dir]/bin/mysql -h hostname -u root -p |
Create a database on the sql server.
1 |
mysql> create database [databasename]; |
List all databases on the sql server.
1 |
mysql> show databases; |
Switch to a database.
1 |
mysql> use [db name]; |
To see all the tables in the db.
1 |
mysql> show tables; |
To see database’s field formats.
1 |
mysql> describe [table name]; |
To delete