MySQL connection error on install.php step #1

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
cczona

MySQL connection error on install.php step #1

Post by cczona »

Help, I'm stuck at install.php step #1. The error returned is
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /PATH/TO/cmsms/adodb/drivers/adodb-mysql.inc.php on line 339
Connection failed
The database seems fine. There's no error when using the same settings to connect via PHPMyAdmin instead.

(By the way, this is with version 0.7.3)
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

MySQL connection error on install.php step #1

Post by Ted »

Hmm... I wonder why it's trying to connect to a unix socket instead of over the network. Are you just using the standard settings (host: localhost / port: 3306)?
Akrabat

MySQL connection error on install.php step #1

Post by Akrabat »

wishy wrote:Hmm... I wonder why it's trying to connect to a unix socket instead of over the network. Are you just using the standard settings (host: localhost / port: 3306)?
MySQL uses sockets when you use "localhost" as the hostname.

From http://dev.mysql.com/doc/mysql/en/Can_n ... erver.html :
"A MySQL client on Unix can connect to the mysqld server in two different ways: By using a Unix socket file to connect through a file in the filesystem (default `/tmp/mysql.sock'), or by using TCP/IP, which connects through a port number. A Unix socket file connection is faster than TCP/IP, but can be used only when connecting to a server on the same computer. A Unix socket file is used if you don't specify a hostname or if you specify the special hostname localhost."
Locked

Return to “[locked] Installation, Setup and Upgrade”