acooper Posted August 16, 2004 Posted August 16, 2004 OK. So I created a database and tried connecting to it using: <?php $dbh=mysql_connect ("localhost", "macgunc_cnuke", "<password>") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("macgunc_test"); ?> ... And I get: Warning: mysql_connect(): Access denied for user: 'macgunc_cnuke@localhost' (Using password: YES) in /home/macgunc/public_html/php/index.php on line 2 I cannot connect to the database because: Access denied for user: 'macgunc_cnuke@localhost' (Using password: YES) I been asking around with no answers. I didn't think I should of came to you and bother you guys again but I had no other choice. Any suggestions? Thank you again. Quote
TCH-Thomas Posted August 16, 2004 Posted August 16, 2004 I have received a similar error a few times, then it was because I had entered wrong mysql-pw in some config file. Have you made sure you are entering exactly correct info? Quote
TCH-Don Posted August 16, 2004 Posted August 16, 2004 I am sure you have done this, but have to ask did you add the user to the database in MySql? Quote
acooper Posted August 16, 2004 Author Posted August 16, 2004 Positive I got everything right. The password is correct, the user is there. I even used the Connection Strings it gave me this time and still the same error. Quote
TCH-Don Posted August 16, 2004 Posted August 16, 2004 I know this may noy help, but in the connection string you posted ><?php $dbh=mysql_connect ("localhost", "macgunc_cnuke", "<password>") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("macgunc_test"); ?> there are two different db cnuke and test (in the error message) Which is the db? Quote
acooper Posted August 17, 2004 Author Posted August 17, 2004 The user is cnuke and the db is test. Quote
TCH-Don Posted August 17, 2004 Posted August 17, 2004 You are right the connection string should be $dbh=mysql_connect ("localhost", "cpanelname_user", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("cpanelname_databasename"); Double check the password, which will not have the cpanel name with it. Is this the cpanel phpnuke install? Quote
acooper Posted August 17, 2004 Author Posted August 17, 2004 I deleted the database and user and made them again. The password is correct. No this isnt a phpnuke install, ignore the name "nuke". If I give one of you TCH guys my login info could you take a peek at it possibly? Quote
TCH-Don Posted August 17, 2004 Posted August 17, 2004 You might open a help ticket so the info is secure and you should only give your login to the techs that way. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.