Ollie Posted May 21, 2011 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:)
Guest Geoff Posted May 21, 2011 Posted May 21, 2011 Use mysql_connect("localhost","gypktube","myPassword") or die ("Could not connect.");
jje Posted May 22, 2011 Posted May 22, 2011 After that, use: mysql_select_db("gypktube_chatData") or die ("no database");
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now