Shalivar Posted February 10, 2008 Posted February 10, 2008 Hi, I am trying to revive my web store after it was shut down for several years. I have gone to the same host I had before, but changing of passwords, etc. is causing me problems. When I try to view my store, I get this: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'shali2'@'localhost' (using password: YES) in /home/shali4/public_html/includes/functions/database.php on line 19 Unable to connect to database server! When I look at database.php, I see this: <?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; } function tep_db_close($link = 'db_link') { global $$link; return mysql_close($$link); } Can anyone tell me what I need to do?
Guest Posted February 10, 2008 Posted February 10, 2008 Hi, I am trying to revive my web store after it was shut down for several years. I have gone to the same host I had before, but changing of passwords, etc. is causing me problems. When I try to view my store, I get this: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'shali2'@'localhost' (using password: YES) in /home/shali4/public_html/includes/functions/database.php on line 19 Unable to connect to database server! When I look at database.php, I see this: <?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; } function tep_db_close($link = 'db_link') { global $$link; return mysql_close($$link); } Can anyone tell me what I need to do? Have a look in your includes/configure.php file BUT do not post the information.
♥geoffreywalton Posted February 10, 2008 Posted February 10, 2008 Once you know what user name / password and database your shop expects to use to connect to to get data you then need to got to check how which users are set up to be allowed to access your database. 1) Go to you ISPs admin area for your site. 2) Click on the icon for Mysql, then find the link for phpmyadmin, it might be hidden away at the bottom but not on all admin sites. If you can’t find this, please consult your ISP's help desk. 3) Click on "Privileges" and check shali2 exists as a user and has all privileges. Consider deleting this user and setting up another as half the world now knows your user name and now only has to break the password, (make it very complicated) 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 ======>>>>>.
Shalivar Posted February 10, 2008 Author Posted February 10, 2008 Once you know what user name / password and database your shop expects to use to connect to to get data you then need to got to check how which users are set up to be allowed to access your database. 1) Go to you ISPs admin area for your site. 2) Click on the icon for Mysql, then find the link for phpmyadmin, it might be hidden away at the bottom but not on all admin sites. If you can’t find this, please consult your ISP's help desk. 3) Click on "Privileges" and check shali2 exists as a user and has all privileges. Consider deleting this user and setting up another as half the world now knows your user name and now only has to break the password, (make it very complicated)
Shalivar Posted February 10, 2008 Author Posted February 10, 2008 Once you know what user name / password and database your shop expects to use to connect to to get data you then need to got to check how which users are set up to be allowed to access your database. 1) Go to you ISPs admin area for your site. 2) Click on the icon for Mysql, then find the link for phpmyadmin, it might be hidden away at the bottom but not on all admin sites. If you can’t find this, please consult your ISP's help desk. 3) Click on "Privileges" and check shali2 exists as a user and has all privileges. Consider deleting this user and setting up another as half the world now knows your user name and now only has to break the password, (make it very complicated) The username you are seeing is the old one!
Shalivar Posted February 11, 2008 Author Posted February 11, 2008 Bless you Goeffrey, I was finally able to view the website! No one had mentioned the configure.php file! Thank you so much!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.