开发者

Can't Drupal be installed on a MySQL server running with default settings?

Meaning root with no password. I get an installation error saying Drupal cannot connect to the database server. I'm usi开发者_开发技巧ng the default XAMPP-packaged MySQL server on Linux. The server is running as I can interact with it through phpMyAdmin.

Warning: PDO::_construct() [pdo.--construct]: [2002] Invalid argument (trying to connect via unix://) in DatabaseConnection->_construct() (line 300 of/opt/lampp/htdocs/drupal/drupal-7_0/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 database server. The server reports the following message: SQLSTATE[HY000] [2002] Invalid argument. Is the database server running? Does the database exist, and have you entered the correct database name? Have you entered the correct username and password? Have you entered the correct database hostname?


I would suggest to simply create a new user per site, that is what I do and really simple to do with phpmyadmin. Just add a new user and then chose "Create database with same name and grant all privileges".

Your error doesn't seem related to not having a password though but about socket vs tcp. Try "127.0.0.1" instead of "localhost" for the host.


Check the database connection details (DB name, Username, Password, etc). Apart from this, make sure HOST NAME is correct and PORT Number also. In my case, port number was different. It was 3307.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜