Mysql 建立 table的问题。。
mooncold@debian-mooncold:~$ su
Password:
debian-mooncold:/home/mooncold# mysql -u xywu -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 49 to server version: 4.0.24_Debian-10sarge2-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use pdf;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> create table book ( id INT(11), filename VARCHAR, filetype CHAR );
ERROR 1064: 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 ' filetype CHAR )' at line 1
mysql> create table book ( id INT(11) );
ERROR 1: Can't create/write to file './pdf/book.frm' (Errcode: 13)
mysql> create table book ( id INT(11), filename VARCHAR, filetype CHAR);
ERROR 1064: 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 ' filetype CHAR)' at line 1
mysql>
上面的 mysql的帐户 具有所有的权限 。我换 mysql的root帐户建立数据表的时候也是出现同样的问题。
我的系统是 debian 3。1的。安装的 mysql是系统所带的。
Apache+PHP+Mysql用起来都没问题。