Title: Error:SQLSTATE[42000]:
Last modified: January 4, 2024

---

# Error:SQLSTATE[42000]:

 *  Resolved [Local](https://wordpress.org/support/users/fullctrl/)
 * (@fullctrl)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/)
 * Hi,
 * I have some problems importing fra Joomla to WP. I have exported the Joomla, 
   and installed in on the same database with phpMyAdmin but I still can’t get the
   import to work as I get this error; 
   [ERROR] Error:SQLSTATE[42000]: Syntax error
   or access violation: 1104 The SELECT would examine more than MAX_JOIN_SIZE rows;
   check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the 
   SELECT is okay I’ve chatted with my hosting and got this reply:  The error is
   related to a SELECT query with a large number of rows, causing the SQL query 
   to fail. This issue is associated with the plugin you use to import the database,
   which requires adjusting the configuration settings or script. Unfortunately,
   we are unable to assist further, as the database structure in Joomla is not precisely
   the same as in WordPress, even though both platforms use MySQL. Can you help 
   me?

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17325083)
 * When does this message happen?
 *  Thread Starter [Local](https://wordpress.org/support/users/fullctrl/)
 * (@fullctrl)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17325267)
 * When I’ve started the import, this is the message in the log: 
   HTTP connection
   successfulImporting categories…36 categories importedImporting posts…[ERROR] 
   Error:SQLSTATE[42000]: Syntax error or access violation: 1104 The SELECT would
   examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS
   =1 or SET MAX_JOIN_SIZE=# if the SELECT is okay0 posts imported1 links category
   importedImporting web links…0 web links imported0 medias importedDon’t forget
   to modify internal links.**IMPORT COMPLETED**
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17325327)
 * What is the value of MAX_JOIN_SIZE on your MySQL server?
   You can get it by running
   this SQL request on phpMyAdmin:
 *     ```wp-block-code
       SHOW VARIABLES LIKE 'max_join_size';
       ```
   
 *  Thread Starter [Local](https://wordpress.org/support/users/fullctrl/)
 * (@fullctrl)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17325611)
 * max_join_size 67108864
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17325814)
 * Try to type:
 *     ```wp-block-code
       SET MAX_JOIN_SIZE=18446744073709551615
       ```
   
 * as a SQL request in phpMyAdmin. Then retry the import.
 *  Thread Starter [Local](https://wordpress.org/support/users/fullctrl/)
 * (@fullctrl)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17328156)
 * I got a feedback from my hosting saying; 
   MAX_JOIN_SIZE is a server-wide parameter
   and for that, it can’t be changed in a shared MySQL server which we have.Any 
   other way for me to import the joomla?
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17328171)
 * Another solution is to run the migration in local. In this case, you won’t have
   the limitations of the server.
 * Here is the procedure for Windows: [https://www.fredericgilles.net/migrate-wordpress-local-windows-server/](https://www.fredericgilles.net/migrate-wordpress-local-windows-server/)
   and for Mac: [https://www.fredericgilles.net/how-to-migrate-to-wordpress-from-various-cms-on-a-mac-mamp-server/](https://www.fredericgilles.net/how-to-migrate-to-wordpress-from-various-cms-on-a-mac-mamp-server/)
 *  Thread Starter [Local](https://wordpress.org/support/users/fullctrl/)
 * (@fullctrl)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17328463)
 * Hi, before I try the local migration, I tried another host (pressable). 
   Now 
   I have added the SQL files to the same database, but still get an error; [ERROR]
   Joomla tables not found. Please make sure you have entered the right Joomla database
   name and table prefix.But I use the prefix that’s in the database (I do have 
   several), and the right database name.. Any idea? 🙂
    -  This reply was modified 2 years, 5 months ago by [Local](https://wordpress.org/support/users/fullctrl/).
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17329390)
 * If the Joomla tables are in the same database as WordPress, please double check
   the database name and prefix. And check that all tables are present.
 *  Thread Starter [Local](https://wordpress.org/support/users/fullctrl/)
 * (@fullctrl)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17346787)
 * It was all correct, but in the end I ended up with a local migration. Thank you
   for a great “how-to”, made it so easy and saved me so much time!!
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17346894)
 * You are welcome.
 *  Thread Starter [Local](https://wordpress.org/support/users/fullctrl/)
 * (@fullctrl)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17346958)
 * And just a dummy question from a noob; now that I have migrated the Joomla to
   WordPress, and then exported from the local site to the “live-site” – can I delete
   the wordpress.test that is located in Wamp?
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17348543)
 * Yes, you can do it safely.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Error:SQLSTATE[42000]:’ is closed to new replies.

 * ![](https://ps.w.org/fg-joomla-to-wordpress/assets/icon-256x256.png?rev=975975)
 * [FG Joomla to WordPress](https://wordpress.org/plugins/fg-joomla-to-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fg-joomla-to-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fg-joomla-to-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/fg-joomla-to-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fg-joomla-to-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fg-joomla-to-wordpress/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Kerfred](https://wordpress.org/support/users/kerfred/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/errorsqlstate42000/#post-17348543)
 * Status: resolved