подскажите, что не так?
CREATE TABLE pass_old ( 'userid' INT(11) NOT NULL AUTO_INCREMENT, 'pass_old' varchar(256), FOREIGN KEY ('userid') REFERENCES users('userid') on delete cascade);
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 ''userid' INT(11) NOT NULL AUTO_INCREMENT, 'pass_old' varchar(256), FOREIGN KEY (' at line 1
Rsa97, да это я уже по всякому пытался просто - без автоинкремента тоже самое
mysql> CREATE TABLE `pass_old`(`userid` INT(11), `pass_old` varchar(256), foreign key (`userid`) references work.users(`userid`) on delete cascade );
ERROR 1215 (HY000): Cannot add foreign key constraint
mysql> SHOW ENGINE INNODB STATUS;
------------------------
LATEST FOREIGN KEY ERROR
------------------------
2018-03-05 10:08:39 7f5d49b46700 Error in foreign key constraint of table work/pass_old:
foreign key (`userid`) references work.users(`userid`) on delete cascade ):
Cannot resolve table name close to:
(`userid`) on delete cascade )