Answers.Body: <p>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. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-18T22:00:33.367Z
Answers.LastActivityDate: 2018-01-18T22:00:33.367Z
Answers.UserDisplayName: StigMil
Answers.Body: <p>The php mysql extension is no longer supported. Need to use mysqli. See
  <a href="https://civicrm.org/blog/totten/psa-please-verify-php-extension-mysqli" rel="nofollow noreferrer">https://civicrm.org/blog/totten/psa-please-verify-php-extension-mysqli</a></p>
  
  <p>The web server log might also indicate the error.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-14T22:15:04.113Z
Answers.Text: 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.
Answers.UserDisplayName: StigMil
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-14T18:30:36.037Z
Answers.LastActivityDate: 2018-01-14T18:30:36.037Z
Answers.UserDisplayName: Demerit
Body: <p>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:</p>
  
  <p>"Cannot open mysql://[user]:[password]@localhost:3307/[path_to_database]?new_link=true: DB Error: connect failed."</p>
  
  <p>The server port number is correct for this installation. </p>
  
  <p>Any idea where I can look for more detail on why the connection fails at this stage?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-15T18:25:23.880Z
Comments.Text: 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.
Comments.UserDisplayName: Hassan Farooq
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-15T18:35:41.520Z
Comments.Text: Thanks. The [path_to_database] is @localhost:3307/run/mysqld/mysqld10.sock/databasename. I'll look at php.ini.
Comments.UserDisplayName: StigMil
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-16T02:14:04.170Z
Comments.Text: Normally for a tcp socket you don't include the "unix socket" path. Try just the database name, e.g. @localhost:3307/databasename
Comments.UserDisplayName: Demerit
Tags: <wordpress><database><installation>
Title: How do I troubleshoot DB Error: connect failed on a new installation on Wordpress?
ThreadText: # How do I troubleshoot DB Error: connect failed on a new installation on Wordpress?
  
  (Asked by: username_0 on 2018-01-14)
  
  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?
  
  **Tags:** wordpress, database, installation
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: Thanks. The [path_to_database] is @localhost:3307/run/mysqld/mysqld10.sock/databasename. I'll look at php.ini.  
  > **username_2**: Normally for a tcp socket you don't include the "unix socket" path. Try just the database name, e.g. @localhost:3307/databasename  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-01-18. Score: 1
  
  As suggested by username_2, 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.
  
  
  ---
  
  ### Answer by username_2 on 2018-01-14. Score: 1
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  