随便找个工具,比如直接用mysql客户端命令行工具[code=BatchFile]C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.33-community-log MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> create database test;
mysql> use test;
mysql> use test;
Database changed
mysql> create table reguser (
-> id int primary key,
-> userid int,
-> sex char,
-> age int,
-> tel int,
-> email varchar(50),
-> address varchar(50)
-> );
Query OK, 0 rows affected (0.14 sec)mysql>[/code]
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.33-community-log MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> create database test;
mysql> use test;
mysql> use test;
Database changed
mysql> create table reguser (
-> id int primary key,
-> userid int,
-> sex char,
-> age int,
-> tel int,
-> email varchar(50),
-> address varchar(50)
-> );
Query OK, 0 rows affected (0.14 sec)mysql>[/code]
第3章:教程
目录3.1. 连接与断开服务器
3.2. 输入查询
3.3. 创建并使用数据库
3.3.1. 创建并选择数据库
3.3.2. 创建表
3.3.3. 将数据装入表中
3.3.4. 从表检索信息
3.4. 获得数据库和表的信息
3.5. 在批处理模式下使用mysql
3.6. 常用查询的例子
3.6.1. 列的最大值
3.6.2. 拥有某个列的最大值的行
3.6.3. 列的最大值:按组
3.6.4. 拥有某个字段的组间最大值的行
3.6.5. 使用用户变量
3.6.6. 使用外键
3.6.7. 根据两个键搜索
3.6.8. 根据天计算访问量
3.6.9. 使用AUTO_INCREMENT
3.7. 孪生项目的查询
3.7.1. 查找所有未分发的孪生项
3.7.2. 显示孪生对状态的表
3.8. 与Apache一起使用MySQL