我在test数据库下建了一个data表如下: create table data( id mediumint not null auto_increment primary key,content varchar(50) not null,dat datetime); 总是出现 error 1005 (hYooo):can't create table 'test.data' <error:121>
在TEST下, create table t1 (id int);试试行不行。
贴出你如下的结果。mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | csdn | | examples | | mysql | | test | +--------------------+ 5 rows in set (0.00 sec)mysql> show grants; +------------------------------------------------------------------------------- | Grants for root@localhost +------------------------------------------------------------------------------- | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*23A E809DDACAF96AF0FD78ED04B6A265E05AA257' WITH GRANT OPTION | +------------------------------------------------------------------------------- 1 row in set (0.00 sec)mysql>
create table data( id mediumint not null auto_increment primary key,content varchar(50) not null,dat datetime);
总是出现 error 1005 (hYooo):can't create table 'test.data' <error:121>
create table t1 (id int);试试行不行。
+--------------------+
| Database |
+--------------------+
| information_schema |
| csdn |
| examples |
| mysql |
| test |
+--------------------+
5 rows in set (0.00 sec)mysql> show grants;
+-------------------------------------------------------------------------------
| Grants for root@localhost
+-------------------------------------------------------------------------------
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*23A
E809DDACAF96AF0FD78ED04B6A265E05AA257' WITH GRANT OPTION |
+-------------------------------------------------------------------------------
1 row in set (0.00 sec)mysql>