I'm running Ubuntu with MySQL version 5.5.44
mysqld Ver 5.5.44-0ubuntu0.14.10.1 for debian-linux-gnu on x86_64 ((Ubuntu))
I have a DB with foreign keys. I would like to have the foreign key check disabled at the system level (not at the session).
I saw the system var foreign_key_checks that seems to control this behavior but when I set it in
/etc/mysql/my.cnf (by adding
foreign_key_checks = 0) the server won't start. The error log looks like:
150729 15:38:18 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead. 150729 15:38:18 [Note] Plugin 'FEDERATED' is disabled. 150729 15:38:18 InnoDB: The InnoDB memory heap is disabled 150729 15:38:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins 150729 15:38:18 InnoDB: Compressed tables use zlib 1.2.8 150729 15:38:18 InnoDB: Using Linux native AIO 150729 15:38:18 InnoDB: Initializing buffer pool, size = 128.0M 150729 15:38:18 InnoDB: Completed initialization of buffer pool 150729 15:38:18 InnoDB: highest supported file format is Barracuda. 150729 15:38:18 InnoDB: Waiting for the background threads to start 150729 15:38:19 InnoDB: 5.5.44 started; log sequence number 56348937 150729 15:38:19 [ERROR] /usr/sbin/mysqld: unknown variable 'foreign_key_checks=0' 150729 15:38:19 [ERROR] Aborting
How can I configure my MySQL server to start with foreign key checks off at the system level?
Edit: behavior is the same with MySQL 5.6.25:
mysqld Ver 5.6.25-0ubuntu0.15.04.1 for debian-linux-gnu on x86_64 ((Ubuntu))