使用MySQL创建一个数据库的问题

9 views
Skip to first unread message

ajax

unread,
Oct 31, 2009, 10:35:47 PM10/31/09
to CPHPUG-中国PHP用户组
刚刚学习php+mysql,把mysql装好后,想运行下书中的例子,在命令行中进入mysql,
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.87-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
执行如下的命令后:
mysql> creat database books;

出现了如下的问题:
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that
corresponds to your MySQL server version for the right syntax to use
near 'creat
database books' at line 1
难道是不能在这里创建新的数据库,如果要创建一个新的数据库,该怎么操作呢。谢谢了~

Mr Shore

unread,
Oct 31, 2009, 10:46:35 PM10/31/09
to cph...@googlegroups.com
creat => create

有问题欢迎发到http://51hired.com/questions/ask

2009/11/1 ajax <aja...@gmail.com>



--
http://51hired.com/


zhudogsupe.wanglei

unread,
Oct 31, 2009, 11:05:43 PM10/31/09
to cph...@googlegroups.com
CREATE DATABASE `a`; create 而不是 creat。数据库名称最好带个``。

xTao

unread,
Oct 31, 2009, 10:39:02 PM10/31/09
to cph...@googlegroups.com
create?
---------------------------------------------------------
Tao Xu
徐涛
Beijing University of Posts and Telecommunications

Mobile:   86-13436918704
E-mail:    xutao...@gmail.com
Address: Room 102, Student Apartment 9,
             Beijing University of Posts and Telecommunications,
             No.10 XiTuCheng Road, Haidian District,
             Beijing 100876, P.R.China

Increscunt animi,virescit volnere virtus......



2009/11/1 ajax <aja...@gmail.com>

ajax

unread,
Oct 31, 2009, 11:57:50 PM10/31/09
to CPHPUG-中国PHP用户组
额~傻帽了,昨晚没睡好的缘故,麻烦大家了,问了个这么傻帽的问题》》》

zhudogsupe.wanglei

unread,
Nov 1, 2009, 12:36:38 AM11/1/09
to cph...@googlegroups.com
帖子不多,没关系。

ajax said the following on 11/01/2009 11:57 AM http://fwanglei.appspot.com/ 写道:
> 额~傻帽了,昨晚没睡好的缘故,麻烦大家了,问了个这么傻帽的问题》》》

Reply all
Reply to author
Forward
0 new messages