I am using code that looks like this:
<?php
$db_con = mysql_connect("localhost","root","abc123");
if (!$db_con){
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_data", $db_con);
?>
I am trying to connect to a MYSQL Database I made, but the script keeps returning an error "Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/teampyro/public_html/scout/config.php on line 2
Could not connect: Access denied for user 'root'@'localhost' (using password: YES)"
This is a very noobish question but how should I connect to my database?