Does MySQL foreign_key_checks affect the entire database?

后端 未结 6 1165
南方客
南方客 2020-11-30 18:27

When I execute this command in MySQL:

SET FOREIGN_KEY_CHECKS=0;

Does it affect the whole engine or it is only my current transaction?

6条回答
  •  有刺的猬
    2020-11-30 19:27

    I had the same error when I tried to migrate Drupal database to a new local apache server(I am using XAMPP on Windows machine). Actually I don't know the meaning of this error, but after trying steps below, I imported the database without errors. Hope this could help:

    Changing php.ini at C:\xampp\php\php.ini

    max_execution_time = 600
    max_input_time = 600
    memory_limit = 1024M
    post_max_size = 1024M
    

    Changing my.ini at C:\xampp\mysql\bin\my.ini

    max_allowed_packet = 1024M
    

提交回复
热议问题