Hi. I am having trouble with this:
<?php $host="localhost"; // Host name $username="username"; // Mysql username $password="password"; // Mysql password $db_name="database"; // Database name $tbl_name="table"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); // Line with the error (Line 8) mysql_select_db("$db_name")or die("Error. MySQL Not Responding."); ?>
I recently changed the phpmyadmin login password to the database...
and I get this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in pageURL on line 8
I used the correct password, but it continues to say Access Denied, even though I have the password right. All the login/passwords are right....Not one thing of info is incorrect....The host I use is 000webhost if that helps...I did change the password to the phpmyadmin account at exactly 30 minutes ago. It said to wait one minute... I don't know what is wrong, but it used to work. It just stopped all of a sudden. I would be happy if you helped.