1 MySQL使用前,需要运行MySQL的服务器,运行Server\bin\mysqld.exe即可启动MYSQL的服务器。
2 登陆,从cmd进入Server\bin\,运行mysql -u root即可登陆。
3 创建数据库
> create database testDB; (不要少了最后的分号)
4 创建表格
> create table MyTable(name varchar(20), gender varchar(10));
5 显示已有的表格
> show tables;
6 加载数据到表中
> load data local infile '/path/myData.txt' into table MyTable;
7 存在多个数据库时,可以使用use来选择使用哪个数据库
use testDB;
更多详情请看:http://dev.mysql.com/doc/refman/5.1/zh/tutorial.html#creating-tables