首頁 >資料庫 >mysql教程 >MySQL设置foreign_key_checks_MySQL

MySQL设置foreign_key_checks_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原創
2016-06-01 13:10:391913瀏覽

报错:

C:/xampp/htdocs/yun_course>php app/console doctrine:schema:update --forceUpdating database schema...  [Doctrine/DBAL/DBALException]  An exception occurred while executing 'ALTER TABLE cc_forum_post ADD CONSTR  AINT FK_7226C324CEB06035 FOREIGN KEY (fk_created_by_user_id) REFERENCES use  r (id) ON DELETE SET NULL':  SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint  [PDOException]  SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint

在mysql>输入SET @@global.foreign_key_checks = 0 ;

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn