Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: mysql_connect(): Access denied


matt23

Recommended Posts

Hi, I have just installed oscommerce again after removing an older version from my site. All went well for the installation but i noticed in admin/tools it said i hadnt set up my backups file. i thought i had actually set this up with the server. so i went into configure.php and noticed that the entry for the backups file had backups/. so i removed the / and hit 'put' to update the server. Now i get this message;

 

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

Unable to connect to database server!

 

ahhh! what do i need to do. I didnt think changing such a small / would make such an impact.

 

help is apprecited. cheers.

Matt.

Link to comment
Share on other sites

Yes i did put the / back and uploaded the file but all to no avail.

 

I tried heaps of different setting and still nothing apart from different error messages.

 

Anyway i could be bothered stuffing around with it so i deleted the catalog and have now reinstalled again.

 

From now on im not going into the configure.php file!!

 

Cheers.

Link to comment
Share on other sites

  • 3 weeks later...

I have the same issue. Here are the lines. My data base name is "osc1" username is "mickeyM" password is "unlock" Can someone re write line #19? Should I delete the dat base and create a new database?

 

 

 

 

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

 

if (USE_PCONNECT == 'true') {

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

} else {

LINE#19 $$link = mysql_connect($server, $username, $password);

 

if ($$link) mysql_select_db($database);

 

return $$link;

}

 

function tep_db_close($link = 'db_link') {

global $$link;

 

return mysql_close($$link);

Link to comment
Share on other sites

  • 1 month later...
:thumbsup: I deleted my database on the server. Then created a new one. I ran the install script for OSC again put in the new database info. All fine problem solved.

 

I go t the same thing. I deleted and made a new one a coupel of times with no success. Where shoudl I run the install script at?

Link to comment
Share on other sites

Hi, I have just installed oscommerce again after removing an older version from my site. All went well for the installation but i noticed in admin/tools it said i hadnt set up my backups file. i thought i had actually set this up with the server. so i went into configure.php and noticed that the entry for the backups file had backups/. so i removed the / and hit 'put' to update the server. Now i get this message;

 

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

Unable to connect to database server!

 

ahhh! what do i need to do. I didnt think changing such a small / would make such an impact.

 

help is apprecited. cheers.

Matt.

What did you use to do the edit?

 

You could copy your backup file to replace the one you edited.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...