View Full Version : MySQL Help, Please
ScottMcGrath
12-31-2007, 08:44 PM
I am using DreamHost in order to build a website and PixelPost 1.6.0 in order to display my artwork.
I went through PixelPost's installation instructions and after modifying the pixelpost.php document with my database name and password and all, I followed the link provided in the PixelPost wiki to complete my registration. When I did, the following came up on the webpage:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/Dream_Host_subserver/my_FTP_username/my_website.com/pixelpost_v1.6.0/admin/install.php on line 11
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
(I added the italics for the private information in the above error message.)
What is wrong? Please advise.
Dkozikowski
12-31-2007, 10:43 PM
The install is unable to continue due to Pixelpost not being able to connect to your database.
Double check that all information is correct within your pixelpost.php file.
ScottMcGrath
12-31-2007, 11:23 PM
I have doublechecked that information and it is solid. I also contacted DreamHost's support and got the following response:
"Everything is configured correctly, but for some reason the code is
trying to connect to a local MySQL server instead of a remote one."
And:
"I briefly looked at the code, and the connection string is correct. It
looks like there might be an include somewhere that's over-writting your
pixelpost_db_host parameter and forcing a local connection."
So, what all does that involve? If anyone can help, I'd appreciate it. Also, you'll be helping out someone completely new to the inner workings of websites and code and suchlike, so please take me step by step and use little, nOOb words.
Scott
dhdesign
01-01-2008, 12:07 AM
Usually the line in pixelpost.php that asks for the database host looks like this to connect to the host's MySQL server:
$pixelpost_db_host = "localhost"; // database host, often "localhost"
Most servers that run Apache have it configured for you to connect to your database by using "localhost". However, when looking at DreamHost's wiki (http://wiki.dreamhost.com/MySQL#Connecting_to_Your_Database), it says on this line:
You cannot use "localhost" to connect to your database, as DreamHost's MySQL servers are separate from the regular Web site servers.
You need to contact support at DreamHost and ask them what you should be using in place of "localhost" as the database host in pixelpost.php.
It isn't PP code that is out of whack, it's how DreamHost has their setup for connecting to their MySQL servers.
jaywilliams
01-01-2008, 01:44 AM
If you login to the Dreamhost web panel (http://panel.dreamhost.com/) you can find out your MySQL information there.
Here is a screenshot showing you where to find the information:
http://idisk.d3done.com/idisk/Mysql_Web_Panel-20071231-204309.png
ScottMcGrath
01-01-2008, 05:04 AM
Thank you, guys, but that "localhost" thing was replaced with my hostname correctly, so its not that, either.
fredxeric
01-01-2008, 09:04 AM
oups I did read the all post sorry...
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.