Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Having trouble connecting to the database


Recommended Posts


I just changed hosts and I'm trying to connect the site to the database but I'm getting this error message:


Warning: mysql_connect() [function.mysql-connect]:

Can't connect to local MySQL server through socket

'/var/lib/mysql/mysql.sock' (2) in /home/content/90/6572790/html/includes/functions/database.php

on line 19


This is line 19:

      $$link = mysql_connect($server, $username, $password);


when I try to edit that line, I get this error message:

Parse error: syntax error, unexpected T_DNUMBER in /home/content/90/6572790/html/includes/functions/database.php on line 19


Any ideas? Thanks.

Link to comment
Share on other sites




There error is not in the code......it is the username and password you entered that is now listed in the 2 configure.php files does not match the username and password on the database server.



Ensure you have the correct database information in the TWO configure.php files.





Link to comment
Share on other sites

In the includes FOLDER (catalog and admin) where the normal configure.php files are there is a FOLDER named local


On some installs there may be a configure.php inside the local FOLDER (catalog and admin)


If there is, anything in it overrides anything in the normal configure.php files.


osC sites can have up to FOUR config files.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.


"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -


"Headers already sent" - The definitive help


"Cannot redeclare ..." - How to find/fix it


SSL Implementation Help


Like this post? "Like" it again over there >

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...