Title: Import database connection error
Last modified: March 7, 2018

---

# Import database connection error

 *  Resolved [llaroo](https://wordpress.org/support/users/llaroo/)
 * (@llaroo)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/import-database-connection-error/)
 * I am trying to copy from joomla to wordpress (the joomla site is live with a 
   host provider and I am trying to copy its contents to my wordpress site on my
   localhost).
    I get the following message when I try to test the database connection
   using the Joomla database parameters.
 * **[ERROR] Couldn’t connect to the Joomla database. Please check your parameters.
   And be sure the WordPress server can access the Joomla database.
    SQLSTATE[HY000][
   1045] Access denied for user ‘xxxxxx’@’localhost’ (using password: YES)
 * I am sure that the parameters are correct. Is there any other reason why this
   could be happening? I was also wondering is there was alternate way to achieve
   this?

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

 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10047288)
 * The solution is to copy the Joomla database on the WordPress database:
    – export
   the Joomla database to a SQL file (with phpMyAdmin for example) – import this
   SQL file on the same database as WordPress – run the migration by using the WordPress
   database credentials (host, user, password, database) instead of the Joomla ones
   in the plugin settings. You can find the WordPress credentials in the wp-config.
   php file.
 *  [digitocz](https://wordpress.org/support/users/digitocz/)
 * (@digitocz)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10050438)
 * Hi. I have the same problem. I did not understand your answer (_run the migration
   by using the WordPress database ….._). Can you be more specific? How specifically
   should I make a Joomla database migration into a WordPress database? Thanks a
   lot for your time, Kerfred.
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10051897)
 * Here is a detailed procedure if Joomla and WordPress are not on the same host.
 * 1. With phpMyAdmin, export the Joomla database into a SQL file.
 * 2. Still with phpMyAdmin but on the WordPress host, import this SQL file. So 
   you will have both the Joomla and the WordPress databases on the same host.
 * 3. Then on the plugin screen, you must fill in the database settings: Hostname,
   Port, Database, Username, Password, Joomla Table Prefix. You can find them in
   the WordPress file wp-config.php, except the table prefix that stays the Joomla
   one.
 *  [digitocz](https://wordpress.org/support/users/digitocz/)
 * (@digitocz)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10052845)
 * Hi. Thanks a lot for the explanation. Now it really works. Because I use Zoo 
   in Joomla, I had to buy FG Joomla To WordPress Premium + Zoo module. I have migrated
   the content, but unfortunately the content in WordPress is not. Could you give
   me an advice please? I also attach a log. Do I still have to buy wp-types?
 * === START import 2018-03-08 12:48:39 ===
    Connected with success to the Joomla
   database Joomla data found: 1 category 3 articles 1 user 31 Zoo categories 196
   Zoo items 151 Zoo comments
 * Importing categories…
    0 categories imported Importing posts… 0 posts imported
   0 medias imported 0 Zoo categories imported Importing Zoo items… 1 Zoo item imported
   0 Zoo tags imported 2 Zoo media imported Importing menus… 18 menu items imported
   0 tags imported 0 Zoo comments imported Don’t forget to modify internal links.
   IMPORT COMPLETED === END import 2018-03-08 12:48:45 ===
    -  This reply was modified 8 years, 2 months ago by [digitocz](https://wordpress.org/support/users/digitocz/).
 *  [catherinemabongor](https://wordpress.org/support/users/catherinemabongor/)
 * (@catherinemabongor)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10188861)
 * I am having the same problem except both of my sites (Joomla) and (WordPress)
   are hosted by the same server. I have verified the the password and username 
   in the configuration.php file. I have turned on the remote SQL. I have even allowed_url_fopen
   directive in php.ini I am not sure what else I can do. Any suggestions?
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10188875)
 * [@catherinemabongor](https://wordpress.org/support/users/catherinemabongor/)
   
   This FAQ will help you: [https://www.fredericgilles.net/support/kb/faq.php?id=1](https://www.fredericgilles.net/support/kb/faq.php?id=1)
 * Which exact error message do you get in the log?
 *  [gledger](https://wordpress.org/support/users/gledger/)
 * (@gledger)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10743770)
 * Confused. I imported the Joomla SQL into the WordPress SQL but now I have one
   database with two prefixes. I’m taking the suggestion to run import with the 
   WordPress information, but which prefix should I use?
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10743803)
 * [@gledger](https://wordpress.org/support/users/gledger/) Please don’t overload
   an existing thread with another topic.
    To answer to your question, you must 
   use the Joomla prefix.
 *  [pdelarosa](https://wordpress.org/support/users/pdelarosa/)
 * (@pdelarosa)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10771506)
 * Hello, good morning, I have the following problem. I need to transfer the information
   from a database in Joomla to WordPress, but it is in different servers. I get
   the following error:
 * === START test_database 2018-10-11 14:55:13 ===
    [ERROR] Could not connect to
   the Joomla database. Please check your parameters and make sure that the WordPress
   server can access the Joomla database.
 * SQLSTATE [HY000] [2003] Can not connect to MySQL server on ’10 .130.1.9 ‘(111)
 * Should both databases be on the same server? Thank you!
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10771529)
 * This FAQ describes the solution: [https://www.fredericgilles.net/support/kb/faq.php?id=1](https://www.fredericgilles.net/support/kb/faq.php?id=1)
 *  [pdelarosa](https://wordpress.org/support/users/pdelarosa/)
 * (@pdelarosa)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-10775512)
 * It works! Thank u!!
 *  [mfercho7](https://wordpress.org/support/users/mfercho7/)
 * (@mfercho7)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-11119051)
 * I have the same problem but with a Drupal site, should I do the same process?
   When I import the drupal database to the one in wordpress I have to delete something,
   or I simply add it next to the tables that are from wordpress ?
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-11119090)
 * Yes, same process.
    You don’t have to delete anything.

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

The topic ‘Import database connection error’ 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/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [drupal](https://wordpress.org/support/topic-tag/drupal/)
 * [Joomla](https://wordpress.org/support/topic-tag/joomla/)

 * 13 replies
 * 7 participants
 * Last reply from: [Kerfred](https://wordpress.org/support/users/kerfred/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/import-database-connection-error/#post-11119090)
 * Status: resolved