MySQL database connection error?

Do you see anything weird in the code? I can’t find the error. I have the database and the user made, and still, it won’t work…
[php]<?php
$con = mysql_connect(“localhost”,“vamadisz_site”,“asdsomepass”);
if (!$con)
{
die('Adatbáziskapcsolódási hiba: ’ . mysql_error());
}
mysql_select_db(“vamadisz_main”, $con);
?>[/php]

Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘vamadisz_site’@‘localhost’ (using password: YES) in /home/vamadisz/public_html/hu/index.php on line 35
Adatbáziskapcsolódási hiba: Access denied for user ‘vamadisz_site’@‘localhost’ (using password: YES)

Seems pretty straight forward to me, your login information is wrong. check the that the user has the proper permissions for that database and that the password is correct. If you made the user outside of the database, you need to associate the user with the database.

Sponsor our Newsletter | Privacy Policy | Terms of Service