PostNuke - Can't connect to mysql

apps

#1

I’ve come across several threads about installing PostNuke, and I’m wondering if anyone has come across an error like the one below, and how you were able to resolve the problem.

Warning: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.eliotte/fomhoire/sacramentocity.us/html/pnadodb/drivers/adodb-mysql.inc.php on line 108

Warning: MySQL Connection Failed: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.eliotte/fomhoire/sacramentocity.us/html/pnadodb/drivers/adodb-mysql.inc.php on line 108
mysql://root:@localhost/sacramento failed to connectCan’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)


#2

You need to configure it to connect to a remote database server (e.g., yourmysqlhostname.example.com) instead of to a local socket.


#3

Thanks, that changed the problem, however I’m getting, “Session initialisation failed” now.


#4

Let me make sure I’ve got this straight: this is happening during the initialization script?

What step (it tells you what % along the way you are) are you getting hung up on?

One thing I found that helped me along in the installation is http://postnuke.bloodymongrel.com/ which walks you through step by step.


#5

I’m running into the same problem using the command line interface. How do I set it to connect to a remote database server.

Here’s my command line:
mysql -D dcl -u [NAME] -p [PASSWORD] -P 3306 < createdb.sql

It asks me for the password again, and when I enter it, I get the following error:

Can’t connect to local MySQL server through socket ‘/var/run/mysqld/
mysqld.sock’ (2)

Any suggestions?
Thanks!


#6

[quote]Can’t connect to local MySQL server through socket ‘/var/run
mysqld/mysqld.sock’ (2)
Any suggestions?

[/quote]

It looks like you’re trying to connect to a database on ‘localhost’. This won’t work, as all customer databases are hosted on a different server than their site is located on.

Instead, make sure to pass the “-h” flag, and specify the hostname your database is hosted from.

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#7

Exactly what I needed. Thanks!