I use Ubuntu 10.04 with XAMPP, and i found this error in database installation step:
* Warning: PDO::__construct(): [2002] Invalid argument (trying to connect via unix://) in DatabaseConnection->__construct() (line 286 of /opt/lampp/htdocs/abednego/includes/database/database.inc).
*
In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.
Failed to connect to your MySQL database server. MySQL reports the following message: SQLSTATE[HY000] [2002] Invalid argument.
o Are you sure you have the correct username and password?
o Are you sure that you have typed the correct database hostname?
o Are you sure that the database server is running?
For more help, see the installation handbook. If you are unsure what these terms mean you should probably contact your hosting provider.
So tell me what's the problem
Comments
Well...
Well... tell us what your replies are to the three "Are you sure" questions :c)
Also check whether your configuration files (which should be, in your case,
/opt/lampp/htdocs/abednego/sites/default/settings.php) has the right settings for the $database variable. Something like:I had the same error with one
I had the same error with one of my very first installations of drupal and i have to agree with LaurentAjdnik on this one, check the settings.php and if so manually enter the details there.
This is how i resolved it.
On a side note i was using Ubuntu 10.04 with XAMPP v1.7.3 or v1.7.2 and Drupal v6.16, when i got this error I changed XAMPP to version 1.7.1 and have had no insalation issues since.
What Version of XAMPP and Drupal are you using?
Try this
Change localhost to 127.0.0.1 under advanced options. Hope this helps.
Thnx!!
Changing localhost to 127.0.0.1 worked for me!
Confirmed
Changing "localhost" to "127.0.0.1" in settings.php also works for Ubuntu 13.04 with Drupal 7
Changed to 127.0.0.1 on Ubuntu 11.04
I also can solved similar problem, after reading this post and
changing the server name from localhost to 127.0.0.1 in the Setup Database step.
I'm using Ubuntu 11.04, and XAMPP for Linux 1.7.3a.
When I tried Drupal 7 RC3 on localhost and a live server, I didn't have this problem.
I haven't tried the Drupal 7 on the live server.
Resolved
127.0.0.1 worked for me on mac osx Drupal 8.5.0
Error occurs because of incorrect advanced options w
this error occurs while we set up database and the advanced options are not correct. Make sure the HOSTNAME and PORT Number are correct. In my case, database port number (3307) was different and therefore it could not connect to. Updating the port number resolved the issue.
I was able to resolve this
I was able to resolve this error by stopping one ongoing mysql instance which was running on different port but was not allowing other drupal related sql server to start.