I am following the detailed instructions to install Civi under Wordpress. I am running a local development Wordpress site using MariaDB 10. I have downloaded and activated the CiviCRM plugin. The CiviCRM installer is accessible. I have created a new empty database and user for CiviCRM and I can get a full "Green" ("You're ready to install") from the installer. But when I click on "Check requirements and install" I get an error:

"Cannot open mysql://[user]:[password]@localhost:3307/[path_to_database]?new_link=true: DB Error: connect failed."

The server port number is correct for this installation.

Any idea where I can look for more detail on why the connection fails at this stage?

  • The issue might be the [path_to_database], can you tell us what is the value for that? Also try to set your php.ini to make the default port for mysql and it should work. Jan 15, 2018 at 18:25
  • Thanks. The [path_to_database] is @localhost:3307/run/mysqld/mysqld10.sock/databasename. I'll look at php.ini.
    – StigMil
    Jan 15, 2018 at 18:35
  • 1
    Normally for a tcp socket you don't include the "unix socket" path. Try just the database name, e.g. @localhost:3307/databasename
    – Demerit
    Jan 16, 2018 at 2:14

2 Answers 2


The php mysql extension is no longer supported. Need to use mysqli. See https://civicrm.org/blog/totten/psa-please-verify-php-extension-mysqli

The web server log might also indicate the error.

  • Many thanks. Running phpinfo shows that mysqli is enabled. But when I run the php command line query suggested in the link you posted, it returns "missing". So I'll keep looking at that. Thanks for the pointer.
    – StigMil
    Jan 14, 2018 at 22:15

As suggested by demerit, it is not necessary to specify the "unix socket" path in the server details. On the "CiviCRM Installer" page, in the server details, enter only [servername] and optional [:port] if port is not default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.