1. Enter the mysql server:
>mysql -h localhost (or 127.0.0.1) -u root (fill in the user name) -p (press enter and enter the password).
2. Use the show statement to view which databases are on the current server.
mysql>show databases;
3. Use an existing database:
mysql>use database_name;
4.Create database:
mysql>create database database_name;
5. Display tables in a database:
mysql>show tables;
6. Create table:
mysql>create table table_name(c1 varchar(20),c2 int(3),...);
7. Display the fields in the table book:
mysql>describe book;
8. Add multiple records to the table at one time:
mysql>insert into book values (value_1,value_2....),....(value_n,value_n+1);
For more detailed operations, see the MySQL Reference Manual.
-