luckyginger Posted September 15, 2009 Posted September 15, 2009 I just moved the shop to a different host, and I am not the person who originally installed it. The shop is showing up correctly now, but the admin login page only shows this error: Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/s/c/a/scarlettscoll/html/shop/admin/includes/functions/database.php on line 19 Unable to connect to database server! What is the database.php code supposed to look like when everything is configured correctly?
FIMBLE Posted September 15, 2009 Posted September 15, 2009 Have you checked your admin /includes /configure.php file? There is probably a define in there incorrectly set for the database connections Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
luckyginger Posted September 15, 2009 Author Posted September 15, 2009 that was it! you rock! Thanks very much.
luckyginger Posted September 15, 2009 Author Posted September 15, 2009 oh wait. Now I have this: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'DB_USERNAME'@ Does this mean I should change it to the actual username in the database.php file? (I left off the IP address and the rest of the error message) Please help! I really have to have this site up and running.
FIMBLE Posted September 15, 2009 Posted September 15, 2009 it means the password or username does nto match the database settings on the server. You need to make sure that both sets match exactly Database.php do not touch, its configure.php and the database settings in your hosting control panel for the database Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
luckyginger Posted September 15, 2009 Author Posted September 15, 2009 Still not working - I made sure the username & passwords match. I don't know what to do - I have to have this site working. It would take forever to redo everything. Is there anything else that it could be?
luckyginger Posted September 16, 2009 Author Posted September 16, 2009 I am willing to pay for you to fix this!
Guest Posted September 16, 2009 Posted September 16, 2009 I am willing to pay for you to fix this! hey lucky the database name is the login id for the database login. Are you able to login in to the hosting account for where the databse is stored? You can change it there. Who is your website host and do you have a backup copy of the database?
Ken44 Posted September 16, 2009 Posted September 16, 2009 Hi Ginger The shop is showing up correctly If the shop is working then it must be connecting to the database correctly Look at the last six lines in your admin/includes/configure.php and make them match the last six lines of your catalog/includes/configure.php Regards Ken
luckyginger Posted September 16, 2009 Author Posted September 16, 2009 Hi Ken, The code for admin/includes/configure.php matches the shop/includes/configure.php. Hi Ginger If the shop is working then it must be connecting to the database correctly Look at the last six lines in your admin/includes/configure.php and make them match the last six lines of your catalog/includes/configure.php Regards Ken
luckyginger Posted September 16, 2009 Author Posted September 16, 2009 hey lucky the database name is the login id for the database login. Are you able to login in to the hosting account for where the databse is stored? You can change it there. Who is your website host and do you have a backup copy of the database? hello, I am able to login to the hosting account. And the shop is visible on the web site. Something is not configured right with the admin login page. My host is Godaddy and yes I have a backup copy of the database. I'm sure it's just one thing I need to change, but I don't know what.
luckyginger Posted September 16, 2009 Author Posted September 16, 2009 Hi Ken,The code for admin/includes/configure.php matches the shop/includes/configure.php. ok - I figured out what was wrong! YAY!!! Thanks to everyone for your help!!
Charell Posted October 18, 2009 Posted October 18, 2009 ok - I figured out what was wrong! YAY!!! Thanks to everyone for your help!! That's great that you figured it out but I've tried the same things suggested in this post and have not figured it out. I made the last 6 lines of catalog/admin/includes/configure.php match the last 6 lines of catalog/includes/configure.php Also, I changed the permissions to 777 on both files. And I still get the following error: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/pem/vhosts/171183/webspace/httpdocs/catalog/includes/functions/database.php on line 19 Unable to connect to database server! I am a newbie and have no clue what I'm doing!
germ Posted October 18, 2009 Posted October 18, 2009 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. Check for that. Also be sure the info in the files on the server is what you think is there. Sometimes people make changes locally then FTP the edited file to the server ASSUMING it will get there. And sometimes permissions of the files on the server stop it from being replaced (I know you said you have perms at 777 but if you did that via FTP it might not have worked as FTP fails more times than it succeeds on changing perms on the configure files, the forum is littered with posts of this nature). 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 >
Charell Posted October 19, 2009 Posted October 19, 2009 Hi, thank you for your help but it is still not working. I checked both catalog and admin LOCAl FOLDER and there are no configure.php file located there. Only a READ ME file in each. I also checked that the info in the configure.php (catalog and admin) has the info I believe to be correct there. Both permissions are set to 777. When I try www.battlegroundelectronics.com/catalog/ - this is the error I recieve: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/pem/vhosts/171183/webspace/httpdocs/catalog/includes/functions/database.php on line 19 Unable to connect to database server! When I try http://www.battlegroundelectronics.com/admin/ - I get this error: Error occurred: 404 - not found Apache Server at: d1070658.dotsterhost.com Thank you for your continued help!! Charell
Recommended Posts
Archived
This topic is now archived and is closed to further replies.