muraduk Posted June 26, 2010 Posted June 26, 2010 Hi i have installed an configured the OSC Software..... then added and uploaded a template on.. Now get a error of " Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/jungle2j/public_html/includes/functions/database.php on line 19 Unable to connect to database server!" mY CODING FOR THE 1ST 20 LINES IS PER BELOW... ================================================================================= <?php /* $Id: database.php,v 1.21 2003/06/09 21:21:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ 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 { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; ======================================================================= Can any one advise as to the error and why its coming up, and also how to fix it.. Thanks..in advance..
♥geoffreywalton Posted July 1, 2010 Posted July 1, 2010 The values set in /includes/configure.php and /admin/includes/configure.php for db server, user, db name and password are not working. Try setting them to known good values. Enjoy G 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 ======>>>>>.
lakul Posted July 1, 2010 Posted July 1, 2010 Mines sorted, wrong password :'( which is odd as i've not touched a thing!!
♥geoffreywalton Posted July 1, 2010 Posted July 1, 2010 Someone must have. If not you, then who? G 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 ======>>>>>.
MrPhil Posted July 1, 2010 Posted July 1, 2010 As mentioned, MySQL doesn't like something about the hostname, username, or password that you supplied. If this is the first time you've set up an application using a database, be sure to check with your hosting service for the right format to use for hostname and username. For example, on my host, accounts with one kind of control panel use "localhost" for the hostname, but with the other kind of control panel they offer, you have to use the full domain name (e.g., "mysql02.hostingcompany.com"). Usernames (as well as database names) have to be prefixed with your hosting company account name (e.g., "mysite35_oscdb1", not just "oscdb1" as phpMyAdmin might show you).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.