Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: Access denied for user: 'mysql@localhost'


Guest

Recommended Posts

I have got admin working but can't get catalog up - the error is:

 

Warning: Access denied for user: 'mysql@localhost' (Using password: NO) in /home/mywebsite/web/catalog/includes/functions/database.php on line 19

 

Warning: MySQL Connection Failed: Access denied for user: 'mysql@localhost' (Using password: NO) in /home/mywebsite/web/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

I'm sure I'm missing something simple here! :roll: Can someone enlighten a relative newcomer?

Link to comment
Share on other sites

I've tried everything :? I've checked password etc - still says user "mysql@localhost" denied. I am not using mysql@localhost as a database server name, username or anything? Why does it use mysql@localhost?

Link to comment
Share on other sites

Hi Linda:

Looks like this:

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.mywebsite.com.au'); // eg, http://localhost - should not be NULL for productive servers

define('HTTPS_SERVER', 'https://www.mywebsite.com.au'); // eg, https://localhost - should not be NULL for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'http://www.mywebsite.com.au/phpMyAdmin/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');

define('DIR_FS_DOCUMENT_ROOT', '/home/mywebsite/web');

define('DIR_FS_CATALOG', '/home/mywebsite/web/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'www.mywebsite.com.au'); // eg, localhost - should not be NULL for productive servers

define('DB_SERVER_USERNAME', 'mywebsite');

define('DB_SERVER_PASSWORD', 'XXXXXX');

define('DB_DATABASE', 'mywebsite');

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

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

?>

Hope you can help?

Link to comment
Share on other sites

I've also tried

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.mywebsite.com'); // eg, http://localhost - should not be NULL for productive servers

define('HTTPS_SERVER', 'https://www.mywebsite.com'); // eg, https://localhost - should not be NULL for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');

define('DIR_FS_DOCUMENT_ROOT', '/home/mywebsite/web');

define('DIR_FS_CATALOG', '/home/mywebsite/web/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'www.mywebsite.com'); // eg, localhost - should not be NULL for productive servers

define('DB_SERVER_USERNAME', 'XXXXXX');

define('DB_SERVER_PASSWORD', 'XXXXXX');

define('DB_DATABASE', 'XXXXXXX');

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

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

?>

Help

Link to comment
Share on other sites

I used the same settings in Admin/includes/configure.php and it is working fine. Just one thing. If database tables were imported into my server database location (as databases shown in oscommerce.sql)- how do I find them on my server?

Link to comment
Share on other sites

Try using the second one with:

 

define('DIR_WS_INCLUDES', 'includes/');

 

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

 

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

Link to comment
Share on other sites

Same error??????

 

Warning: Access denied for user: 'mysql@localhost' (Using password: NO) in /home/mywebsite/web/catalog/includes/functions/database.php on line 19

 

Warning: MySQL Connection Failed: Access denied for user: 'mysql@localhost' (Using password: NO) in /home/mywebsite/web/catalog/includes/functions/database.php on line 19

 

CONFIGURE NOW LOOKS LIKE THIS:

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.mywebsite.com.au'); // eg, http://localhost - should not be NULL for productive servers

define('HTTPS_SERVER', 'https://www.mywebsite.com.au'); // eg, https://localhost - should not be NULL for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');

define('DIR_FS_DOCUMENT_ROOT', '/home/mywebsite/web');

define('DIR_FS_CATALOG', '/home/mywebsite/web/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

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

define('DB_SERVER_USERNAME', 'mywebsite');

define('DB_SERVER_PASSWORD', 'xxxxxx');

define('DB_DATABASE', 'mywebsite');

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

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

 

What now???

Link to comment
Share on other sites

If the /admin side of things are working ... compare the two configure.php files and see that the like things are alike.

 

It just doesn't make a lot of sense that one side works and not the other.

 

also if you have both a web and a public_html directory, use:

 

define('DIR_FS_DOCUMENT_ROOT', '/home/whatever/public_html');

Link to comment
Share on other sites

It may help to know the server directory structure:

 

 

home/mywebsite/web/

 

admin

catalog

phpMyAdmin-2.2.6

 

Maybe theres a problem with the database name??? I can't see any databases I recognise in phpMyAdmin-2.2.6.

Link to comment
Share on other sites

Hi,

 

Do you host this shop yourself?

 

Check if you have this file catalogincludeslocalconfigure.php if exit you should make the changes there.

 

Good Luck :lol:

 

Mohamed

Link to comment
Share on other sites

I get this message every time I try to re-install:

 

Step 2: osCommerce Configuration

 

Warning: fopen("/home/mywebsite/web/catalog/includes/configure.php", "w") - Permission denied in /home/mywebsite/web/catalog/install/templates/pages/install_5.php on line 114

 

Warning: fputs(): supplied argument is not a valid File-Handle resource in /home/mywebsite/web/catalog/install/templates/pages/install_5.php on line 115

 

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/mywebsite

/web/catalog/install/templates/pages/install_5.php on line 116

 

Warning: fopen("/home/mywebsite/web/admin/includes/configure.php", "w") - Permission denied in /home/mywebsite/web/catalog/install/templates/pages/install_5.php on line 166

 

Warning: fputs(): supplied argument is not a valid File-Handle resource in /home/mywebsite/web/catalog/install/templates/pages/install_5.php on line 167

 

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/mywebsite/web/catalog/install/templates/pages/install_5.php on line 168

 

The configuration was successful!

 

 

But only admin works-I can change the configuration of the shop here so there must be some database thing happeneing-Do Admin and Catalog store data in the same database?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...