keith23832 Posted November 3, 2007 Posted November 3, 2007 I was adding a database through MySQL account. I set it up and now I get the following error when trying to open my admin or webpage: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'thegu5'@'localhost' (using password: YES) in /home/thegu5/public_html/includes/functions/database.php on line 19 Unable to connect to database server!
Guest Posted November 4, 2007 Posted November 4, 2007 I was adding a database through MySQL account. I set it up and now I get the following error when trying to open my admin or webpage: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'thegu5'@'localhost' (using password: YES) in /home/thegu5/public_html/includes/functions/database.php on line 19 Unable to connect to database server! You may have to set the privileges in the database for your shop database user name.
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 You may have to set the privileges in the database for your shop database user name. I belive I did that. At the bootm of MySQL I selected the username I made (same as the webpage) and enabled all the permissions. Still I have the same error. Is that what I am suppose to do?? A couple of things I did note was I cannot access my admin page or the webpage without getting the same error. All Id id was add a database for a calendar I found on the Oscommerce site and its effecting all databases.
Guest Posted November 4, 2007 Posted November 4, 2007 I belive I did that. At the bootm of MySQL I selected the username I made (same as the webpage) and enabled all the permissions. Still I have the same error.Is that what I am suppose to do?? A couple of things I did note was I cannot access my admin page or the webpage without getting the same error. All Id id was add a database for a calendar I found on the Oscommerce site and its effecting all databases. When did you make the username? You made a new database? What happened to the osc database?
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 When did you make the username?You made a new database? What happened to the osc database? I still have the XXX_ and the XXX_shop databases. I just made another according to the contribution here (make an event calander): http://www.oscommerce.com/community/contri...ons,1061/page,6 In instructed me to make a database and everyone was telling mt to do it in phpmyadmin. All I had was mySQL and a contirbutor here said put it in ther.. were the mistaken??? Am I beyond hope... gulp
Guest Posted November 4, 2007 Posted November 4, 2007 I still have the XXX_ and the XXX_shop databases. I just made another according to the contribution here (make an event calander): http://www.oscommerce.com/community/contri...ons,1061/page,6 In instructed me to make a database and everyone was telling mt to do it in phpmyadmin. All I had was mySQL and a contirbutor here said put it in ther.. were the mistaken??? Am I beyond hope... gulp The install instructions say Create DB table "events_calendar" all you needed to do was run the sql file to install it into your osc db via phpmyadmin which is used as an interface to mysql. As far as osc is concerned, if you created a table, osc would be ok. If you created a database, osc should not be affected unless you did something to the database username and password that is defined in configure.php files.
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 The install instructions say Create DB table "events_calendar" all you needed to do was run the sql file to install it into your osc db via phpmyadmin which is used as an interface to mysql. As far as osc is concerned, if you created a table, osc would be ok. If you created a database, osc should not be affected unless you did something to the database username and password that is defined in configure.php files. I am using lunarpages for web hosting. I did not find phpmyadmin anywhere on it. I created a database in the MySQl and did not do anything to the other DB' sin MySQL. I will check my all my config.php files and verify my host, username and password are correct. Now since my actual webpage is not password protected, why cannot I access it? I get the same error when I go to the main webpage or my admin: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'thegu5'@'localhost' (using password: YES) in /home/thegu5/public_html/includes/functions/database.php on line 19 Unable to connect to database server! Just curious...
Guest Posted November 4, 2007 Posted November 4, 2007 I am using lunarpages for web hosting. I did not find phpmyadmin anywhere on it. I created a database in the MySQl and did not do anything to the other DB' sin MySQL. I will check my all my config.php files and verify my host, username and password are correct. Now since my actual webpage is not password protected, why cannot I access it? I get the same error when I go to the main webpage or my admin:Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'thegu5'@'localhost' (using password: YES) in /home/thegu5/public_html/includes/functions/database.php on line 19 Unable to connect to database server! Just curious... is this thegu5 your username for connecting osc to the db?
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 is this thegu5 your username for connecting osc to the db? It is my in config.php I checked (only checked one so far) file as well as my username in general for the site.
Guest Posted November 4, 2007 Posted November 4, 2007 It is my in config.php I checked (only checked one so far) file as well as my username in general for the site. Does this user name appear a a user in mysql and have adminstrator privileges?
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 Does this user name appear a a user in mysql and have adminstrator privileges? This problem first appeared when I created the DB for the calendar. I went to check the site and the error appeared. I then went back to MySQl and created the username on because there was none there. It created it as thegu5_thegu5 and gave it the same password as what was in my config.php file I looked at. I then went tot he bottom of the page and gave the thegu5 full permissions on everything. I found this to eb a little odd because it has been asking me for username and password when I access the admin page. It still prompts me to do so, but then when I enter it correctly in the log in screen I get the error. Is there more than one config.php I should check?
Guest Posted November 4, 2007 Posted November 4, 2007 This problem first appeared when I created the DB for the calendar. I went to check the site and the error appeared. I then went back to MySQl and created the username on because there was none there. It created it as thegu5_thegu5 and gave it the same password as what was in my config.php file I looked at. I then went tot he bottom of the page and gave the thegu5 full permissions on everything. I found this to eb a little odd because it has been asking me for username and password when I access the admin page. It still prompts me to do so, but then when I enter it correctly in the log in screen I get the error. Is there more than one config.php I should check? There are two configure.php files, one in admin and one in catalog both under the includes directory. thegu5_thegu5 and thegu5 are not the same It is most odd that there were no usernames.
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 There are two configure.php files, one in admin and one in catalog both under the includes directory. thegu5_thegu5 and thegu5 are not the same It is most odd that there were no usernames. Should I change the all config.php files so that the username is thegu5_thegu5?
Guest Posted November 4, 2007 Posted November 4, 2007 Should I change the all config.php files so that the username is thegu5_thegu5? Yes, but only for the database.
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 Yes, but only for the database. Thanks.. I'll let you know you if it works or not. Again I appreciate your input
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 Thanks.. I'll let you know you if it works or not. Again I appreciate your input When I give permision to thegu5_eventcalander for the username and apssword I have created I get the following error on mySQL PHP $dbh=mysql_connect ("localhost", "thegu5_thegu5", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("thegu5_eventscalendar");
Guest Posted November 4, 2007 Posted November 4, 2007 When I give permision to thegu5_eventcalander for the username and apssword I have created I get the following error on mySQL PHP $dbh=mysql_connect ("localhost", "thegu5_thegu5", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("thegu5_eventscalendar"); You should not have a database called thegu5_eventscalendar The instructions say Create DB table "events_calendar" DROP TABLE IF EXISTS events_calendar; CREATE TABLE events_calendar ( event_id int(3) NOT NULL auto_increment, language_id int(11) NOT NULL default '1', start_date date NOT NULL default '0000-00-00', end_date varchar(20) default NULL, title varchar(255) default NULL, event_image varchar(64) default NULL, link varchar(255) default NULL, OSC_link varchar(255) default NULL, description text, date_added datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (event_id,language_id) ) TYPE=MyISAM; Which means you create a table in your osc database.
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 You should not have a database called thegu5_eventscalendar The instructions say Create DB table "events_calendar" DROP TABLE IF EXISTS events_calendar; CREATE TABLE events_calendar ( event_id int(3) NOT NULL auto_increment, language_id int(11) NOT NULL default '1', start_date date NOT NULL default '0000-00-00', end_date varchar(20) default NULL, title varchar(255) default NULL, event_image varchar(64) default NULL, link varchar(255) default NULL, OSC_link varchar(255) default NULL, description text, date_added datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (event_id,language_id) ) TYPE=MyISAM; Which means you create a table in your osc database. I get the same error in my thegu5_ and thegu5_shop database. Am I suppose to have two of them DB?? So back to my original question form a different string...where in my osc databse am I suppose to be that calendar table then?
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 I get the same error in my thegu5_ and thegu5_shop database. Am I suppose to have two of them DB?? So back to my original question form a different string...where in my osc databse am I suppose to be that calendar table then? Also this is a copy of my configure files under admin/includes and includes: <?php/* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 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.theguardiandragon.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.theguardiandragon.com'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', ''); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); 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', 'pub/'); define('DIR_FS_CATALOG', '/home/thegu5/public_html/'); 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 empty for productive servers define('DB_SERVER_USERNAME', 'thegu5'); define('DB_SERVER_PASSWORD', 'XXXXXXXXXXXXXXXXXXXXX'); define('DB_DATABASE', 'thegu5_shop'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' ?> Does it look right??
keith23832 Posted November 4, 2007 Author Posted November 4, 2007 Also this is a copy of my configure files under admin/includes and includes:Does it look right?? Also when I run a check on thegu5_ ther is no file, when I run a check on thegu5_shop there are a fairly long list. Plase also review previous 2 posts. HELP!!!!
Guest Posted November 5, 2007 Posted November 5, 2007 Also this is a copy of my configure files under admin/includes and includes:Does it look right?? Looks right. define('DB_SERVER_USERNAME', 'thegu5'); <------------------------------------ database user name define('DB_SERVER_PASSWORD', 'XXXXXXXXXXXXXXXXXXXXX'); define('DB_DATABASE', 'thegu5_shop'); <----------------------------------------- database
Guest Posted November 5, 2007 Posted November 5, 2007 Also when I run a check on thegu5_ ther is no file, when I run a check on thegu5_shop there are a fairly long list. Plase also review previous 2 posts. HELP!!!! run the sql file in thegu5_shop
Recommended Posts
Archived
This topic is now archived and is closed to further replies.