SQL Problem!


#1

I’m getting this message and I dunno what is wrong with it. Can someone help please?! Thank you!

Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.magdalen/riverlul/river-lullaby.com/b2/b2install.php on line 17
Can’t connect to the database
Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)


#2

It means the machine running the PHP script failed to connect to a local (same machine) mysql server. The mysql server is actually on a remote (not the same machine) machine and a hostname specifies which machine your database is on.

It is supposed to be looking for the database on another machine, using the hostname you specified when creating the database. Make sure you configure the script with the proper hostname, username and password, and that you can browse to http://hostname/ and access phpMyAdmin using the username and password. If your browser says that the hostname can not be found, it is possible you just haven’t waited long enough for the database to get setup. Usually takes 2 hours or less though.

:cool: Perl / MySQL / HTML+CSS


#3

Check for thing like trailing spaces in your host name.