一、error相关
1.MySQL ERROR 1005: Can’t create table (errno: 150)解决办法
可能原因:
(1)外键的引用类型不一样,如主键是int外键是char
(2)找不到主表中引用的列
(3)主键和外键的字符编码不一致,也可能存储引擎不一样
解决办法:
(1)(2)自行检查,(3)可在“;”前加“ENGINE = MYISAM”如:
mysql> create table Student_Course( -> Sno char(9), -> Cno char(4), -> Grade smallint, -> primary key(Sno,Cno), -> foreign key(Sno) references Student(Sno), -> foreign key(Cno) references Course(Cno) -> )ENGINE=MYISAM;
2.MySQL错误ERROR 1366 (HY000): Incorrect string value..
https://www.cnblogs.com/duneF/p/6858534.html