CaldwellYSR
Member
So I'm learning php, I've learned all the basic stuff about php and mysql and now I'm about to start learning how to make them interact with one another. The php code is:
When I try to load this page I keep getting this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES)
I know my password is correct because I can log into mysql using terminal. (and I assume that's what using password: YES means). So why am I getting this error?
Code:
<?php
[INDENT]$connection = mysql_connect("localhost", "root", "my_password");[/INDENT]
?>
When I try to load this page I keep getting this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES)
I know my password is correct because I can log into mysql using terminal. (and I assume that's what using password: YES means). So why am I getting this error?