Support » Plugin: FG Joomla to WordPress » Unable to connect to database locally

  • Resolved Jason Adams

    (@jason_the_adams)


    Greetings!

    So I went the route of importing the Joomla tables to the WordPress database. I got all the tables added and seem good to go.

    For the life of me, though, I cannot connect to the database. Here’s the credentials:
    Data

    I’m getting:

    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] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)

    I know that’s correct because, well, WordPress is working. I checked with my host (WP Engine) to make sure there couldn’t be something else refusing the connection. They said it should work fine.

    Is the “URL of the live Joomla web site” supposed to be the joomla url or the WP url in this instance? Any other ideas?

    Thank you!

    • This topic was modified 1 year, 9 months ago by  Jason Adams. Reason: Added log message
Viewing 1 replies (of 1 total)
  • Plugin Author Kerfred

    (@kerfred)

    You can find many solutions in this post: http://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq but I don’t know which one works.
    For information, the plugin uses PDO to connect to the Joomla database.
    Are you sure that your database hostname is “localhost”? You can find this information in the WordPress file wp-config.php.

    Another solution which I know it works is to install WordPress on your localhost (with MAMP or WAMP), copy the Joomla database on your local MySQL and run the import in local.

    About your second question, the URL field must be filled with the Joomla URL, not the WordPress one.

Viewing 1 replies (of 1 total)
  • The topic ‘Unable to connect to database locally’ is closed to new replies.