Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to connect to Database


ajdadd

Recommended Posts

Posted

I have just installed the ADMIN TEMPLATE by Atecno, and I come up against two warning messages. I tried to contact Atecno however I received a message saying that this account was closed.

 

Anyway.

The first error message is on the catalog side:

"Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL Server Host 'locahost' (1) in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp/shop/catalog/includes/functions/database.php on line 19

Unable to connect to database server!"

 

And this is on the admin:

"

Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'mysql@localhost' (Using password: NO) in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp/shop/catalog/admin/includes/functions/database.php on line 19

Unable to connect to database server!"

 

How should I go about fixing this?

 

 

Thanks

Ash

Posted
Use the correct database name, user name, and password. If you don't know any of these contact your host.

 

I have received the same error directly after running through the initial configuration.

I host my own server, and was only asked to enter username and password during the configuration. The "test connection" to my database was successful.

Should the database.php file contain my database username and pw?

Posted

Thanks for the reply but Im still a little confused [am still new to this]

 

 

I know all of the names etc but where would I put them and in which file?

 

This is the problem area

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);

L.19 } else {

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

}

 

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

 

return $$link;

}

 

Any help?

thanks

Posted
...This is the problem area

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

...

That is not the right place to look.solve your problem.your problem is in the two configure.php files. If you look carefully, you will notice you had the host name wrong:

Unknown MySQL Server Host 'locahost' (1)[

it should have been localhost.

 

 

Access denied for user: 'mysql@localhost'

is your use name really called mysql?

Whatever, you must make sure these db name, server name, user name and pw are correct.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

  • 2 weeks later...
Posted

thanks for that, i got most of it to work,

 

by any chance, do you know how to fix this?

 

 

Warning: main(includes/functions/password_funcs.php) [function.main]: failed to open stream: No such file or directory in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp2/shop/catalog/admin/includes/application_top.php on line 74

Warning: main(includes/functions/password_funcs.php) [function.main]: failed to open stream: No such file or directory in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp2/shop/catalog/admin/includes/application_top.php on line 74

Fatal error: main() [function.require]: Failed opening required 'includes/functions/password_funcs.php' (include_path='.:/usr/local/lib/php') in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp2/shop/catalog/admin/includes/application_top.php on line 74

 

 

THanks

Posted

Do you get this error after the install or during?

 

If after you need to change the gzip compression to false in admin side tool box .

 

 

 

thanks for that, i got most of it to work,

 

by any chance, do you know how to fix this?

 

 

Warning: main(includes/functions/password_funcs.php) [function.main]: failed to open stream: No such file or directory in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp2/shop/catalog/admin/includes/application_top.php on line 74

Warning: main(includes/functions/password_funcs.php) [function.main]: failed to open stream: No such file or directory in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp2/shop/catalog/admin/includes/application_top.php on line 74

Fatal error: main() [function.require]: Failed opening required 'includes/functions/password_funcs.php' (include_path='.:/usr/local/lib/php') in /home/tribalar/domains/thetiedealer.frih.net/public_html/sp2/shop/catalog/admin/includes/application_top.php on line 74

 

 

THanks

Posted

I got that warning near the end of the install.

 

I got to the bit where I did the MySql table, went to admin login and that is what came up.

 

Does this make a difference?

 

Thanks

Archived

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

×
×
  • Create New...