Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to Connect to Database


Cocheeze25

Recommended Posts

Hello Everyone!

 

I recently installed the Discount Coupon Code to my osCommerce site. It seems to be OK on the backend, however, on there is a problem on the front end.

 

I keep getting the following error when I visit my store page:

 

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/thekoino/public_html/osCommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

Has anyone had this problem after installing this component? or can anyone help me out? Thanks!

Link to comment
Share on other sites

Have you set up the 2 files called configuration.php

 

In the the connectio to the db is defined.

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'root');

define('DB_SERVER_PASSWORD', 'xxxx');

define('DB_DATABASE', 'oscommerce');

define('USE_PCONNECT', 'true'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

Does the db actually exist.

 

Just some thoughts to try.

 

Enjoy

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Tahnks for your reply Geoffrey.

 

Here is what I have in my config.php

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'thekoino_p_os1');

define('DB_SERVER_PASSWORD', 'cheese');

define('DB_DATABASE', 'thekoino_p_os2');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

 

here is the error I'm getting on the site: www.thekoinoniahouse.com/oscommerce/store/catalog

 

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/thekoino/public_html/osCommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

Should it actually say "root" in the following line?

 

define('DB_SERVER_USERNAME', 'thekoino_p_os1');

 

This all happened after I installed the Discount Coupon module.

 

Thanks again for your help.

 

Have you set up the 2 files called configuration.php

 

In the the connectio to the db is defined.

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'root');

define('DB_SERVER_PASSWORD', 'xxxx');

define('DB_DATABASE', 'oscommerce');

define('USE_PCONNECT', 'true'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

Does the db actually exist.

 

Just some thoughts to try.

 

Enjoy

Link to comment
Share on other sites

Tahnks for your reply Geoffrey.

 

Here is what I have in my config.php

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'thekoino_p_os1');

define('DB_SERVER_PASSWORD', 'cheese');

define('DB_DATABASE', 'thekoino_p_os2');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

 

here is the error I'm getting on the site: www.thekoinoniahouse.com/oscommerce/store/catalog

 

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/thekoino/public_html/osCommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

Should it actually say "root" in the following line?

 

define('DB_SERVER_USERNAME', 'thekoino_p_os1');

 

This all happened after I installed the Discount Coupon module.

 

Thanks again for your help.

You have just told the world personal info that you need to change asap. Fix yhat then recheck what yo installed.

Link to comment
Share on other sites

Are both your configuration files set up this way?

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

  • 3 weeks later...
Are both your configuration files set up this way?

Yes both files are set up. as stated above. The database is there; I can access the admin control panel side of the store, but I keep getting the error on the front side.

 

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/thekoino/public_html/osCommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

I'm really at wits end on this and need to get back going; it is holiday season. Please HELP

Link to comment
Share on other sites

Ok

 

Check your data base exists with the name thekoino_p_os2, you will need to use phpmyadmin which can usually be accessed from your ISP's control panel.

 

Check the priviledges, make sure the user name you have selected exists and has all priviledges on the database.

 

(Hopefully by now you have set up a new user and password and removed or at least changed the password for thekoino_p_os1)

 

Now look in both configure.php files, the database name, user name and password should be the same in each configure.php. Your last error message indicated the file in includes\configure\configure.php has root as the user.

 

When you have checked/corrected both files can you access the admin page?

 

Can you access your site?

 

If no to either one, post the complete error messages here.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Here is the error message....

 

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/thekoino/public_html/osCommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

I've checked the DB login info...nothing seems to work. The permissions on my Hosts' control panel seem to be in order; is ther something inside the phpadmin that I need to check? If so, where? and how?

 

I'm praying for a miracle here!

 

Ok

 

Check your data base exists with the name thekoino_p_os2, you will need to use phpmyadmin which can usually be accessed from your ISP's control panel.

 

Check the priviledges, make sure the user name you have selected exists and has all priviledges on the database.

 

(Hopefully by now you have set up a new user and password and removed or at least changed the password for thekoino_p_os1)

 

Now look in both configure.php files, the database name, user name and password should be the same in each configure.php. Your last error message indicated the file in includes\configure\configure.php has root as the user.

 

When you have checked/corrected both files can you access the admin page?

 

Can you access your site?

 

If no to either one, post the complete error messages here.

Link to comment
Share on other sites

Here is the error message....

 

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in /home/thekoino/public_html/osCommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

I've checked the DB login info...nothing seems to work. The permissions on my Hosts' control panel seem to be in order; is ther something inside the phpadmin that I need to check? If so, where? and how?

 

I'm praying for a miracle here!

In phpmyadmin check your usernames and passwords.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...