Error (near "ON" at position 25) while importing Table for WORDPRESS ( A foreign key Error) Error (near "ON" at position 25) while importing Table for WORDPRESS ( A foreign key Error) wordpress wordpress

Error (near "ON" at position 25) while importing Table for WORDPRESS ( A foreign key Error)


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 = 600max_input_time = 600memory_limit = 1024Mpost_max_size = 1024M

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

max_allowed_packet = 1024M


  1. Goto XAMPP control panel>
  2. Stop Apache and MySql services>
  3. Click on Config of Apache>select php.ini and change the followings:
    max_execution_time = 600
    max_input_time = 600
    memory_limit = 1024M
    post_max_size = 1024M

  4. Click on Config button of MySql and select my.ini and change:
    max_allowed_packet = 1024M

  5. Again Start the services and try.. i hope it will work.


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.inimax_execution_time = 600max_input_time = 600memory_limit = 1024Mpost_max_size = 1024MChanging my.ini at C:\xampp\mysql\bin\my.inimax_allowed_packet = 1024M