Ollie Posted May 21, 2011 Share Posted May 21, 2011 hey, i am trying to connect to my phpmyadmin database via PHP here is my code: <?php // place your DB_host, UserName, Password, and DB_Name below where shown mysql_connect("localhost","gypktube@localhost","myPassword") or die ("Could not connect."); mysql_select_db("chatData") or die ("no database"); ?> and the warning i am getting is: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'gypktube@localho'@'localhost' (using password: YES) in /home/gypktube/public_html/connect_to_mysql.php on line 3 Could not connect. thanks:) Quote Link to comment Share on other sites More sharing options...
Guest Geoff Posted May 21, 2011 Share Posted May 21, 2011 Use mysql_connect("localhost","gypktube","myPassword") or die ("Could not connect."); Quote Link to comment Share on other sites More sharing options...
jje Posted May 22, 2011 Share Posted May 22, 2011 After that, use: mysql_select_db("gypktube_chatData") or die ("no database"); Quote Link to comment Share on other sites More sharing options...
Ollie Posted May 22, 2011 Author Share Posted May 22, 2011 Thanks Quote Link to comment Share on other sites More sharing options...
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.