Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shop link is configured correctly, Admin page won't connect to database


luckyginger

Recommended Posts

Posted

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?

Posted

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.

Posted

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

Posted

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?

Posted
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?

Posted

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

Posted

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

Posted
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.

Posted
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!!

  • 1 month later...
Posted

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!

Posted

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 >

Posted

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

Archived

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

×
×
  • Create New...