创建数据表:
mysql>create table tb_mrbook(
->id int(4) auto_increment prima
->name varchar(20) NOT NULL,
->pwd varchar(20) NOT NULL);
但是却提示
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 ‘prima
name varchar(20) NOT NULL,
pwd varchar(20) NOT NULL)' at line 2
不知道什么原因啊
mysql>create table tb_mrbook(
->id int(4) auto_increment prima
->name varchar(20) NOT NULL,
->pwd varchar(20) NOT NULL);
但是却提示
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 ‘prima
name varchar(20) NOT NULL,
pwd varchar(20) NOT NULL)' at line 2
不知道什么原因啊
-> id int auto_increment primary key,
-> name varchar(20) not null,
-> pwd varchar(20) not null)
-> ;
Query OK, 0 rows affected (0.33 sec)
id int(4) auto_increment primary key,
name varchar(20) NOT NULL,
pwd varchar(20) NOT NULL);
id int(4) auto_increment primary key,
name varchar(20) NOT NULL,
pwd varchar(20) NOT NULL);orCREATE TABLE tb_mrbook(
id INT(4) AUTO_INCREMENT ,
NAME VARCHAR(20) NOT NULL,
pwd VARCHAR(20) NOT NULL,
KEY (id)
);
用show databases显示如图:
但是怎么在自己的本地电脑上找到这些数据库文件呢
可以show
但是怎么在自己的本地电脑上找到这些数据库文件呢
出了问题,从错误提示入手。查看mysql配置文件my.ini,里面的 datadir