If WordPress is not on the same host as the Joomla database, you must not use “localhost” as the host. You must use the real MySQL host.
Joomla is not on the same host as WordPress, but from what I can see in phpmyadmin localhost
is the host. But to be sure I tried my domain name and I now get this error:
[fgj2wp] Couldn't connect to the Joomla database. Please check your parameters. And be sure the WordPress server can access the Joomla database.
SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'drollyankees.com' (110)
I just found a variable in phpmyadmin called hostname and tried putting it’s value in to the plugin as the host but I still get the same error as in my previous post.
You can find the database credentials in the Joomla file configuration.php.
Please also read the FAQ for the workaround if your Joomla database is not accessible from WordPress.
http://wordpress.org/plugins/fg-joomla-to-wordpress/faq/
I went to the FAQ and I tried the workaround.
At bullet Point:
import this SQL file on the same database as WordPress
I’m hung up as phpMyAdmin just fails miserably at importing this file. Can you provide a detailed explination of importing the .sql file to the WordPress installation?
With PHPMyAdmin on the Joomla database -> export the tables to a SQL file
With PHPMyAdmin on the WordPress database -> import the SQL file
Did that. Must be a problem at the host configuration. Will continue to google.
How is this marked as resolved?
I am encountering the same errors.
With PHPMyAdmin on the Joomla database -> export the tables to a SQL file
With PHPMyAdmin on the WordPress database -> import the SQL file
Is not the solution as there is an error with credentials when importing the SQL file.
I found the easiest thing to do was to install an instance of wordpress through my host provider (specifically to a subfolder of the site, like “mywebsite.com/export”.
Then, you login to the WordPress backend (in this example, “mywebsite.com/export/wp-admin” and login with the credentials for the bs site.
go to Tools>import and modify to your needs:
Website: “http://mywebsite.com”
Joomla Version
hostname: “localhost”
Port: 3306 (Contact your host provider for more info)
Database (these come from the home/configuration.php file, as mentioned –
var $host = ‘localhost’;
var $user = ‘This_value_is_your_database_username’;
var $db = ‘This_value_is_your_database’;
var $dbprefix = ‘This_is_the_Joomla_table_prefix_value’;
Also, you will need the DATABASE password (not the one you use to login to the Configuration Panel on your webhost provider’s page. I lost the password that I created when I originally created the joomla database (back in 2009?). So I had to go back to my host Cpanel, and create a new Database user (with new username and password) and assign it to the Database for the Joomla install (give this user full rights). I then modified the Joomla import to reflect this new user. Bam. It works.
Finally, went to export, and exported it as a xml file. It works on my local version using MAMP (or XAMPP).
Also, I noticed that my import runs smoother when I import items as pages rather than posts. When I did them as posts, I noticed that it wouldn’t import anything past a year ago.