468,550 Members | 1,711 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,550 developers. It's quick & easy.

Mysql error

i got this error after uploading all the files in www folder. i'm using webserver

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. /// For the following details,
  3. /// please contact your server vendor
  5. $hostname='localhost'; //// specify host, i.e. 'localhost'
  6. $user='server username'; //// specify username
  7. $pass='server pass'; //// specify password
  8. $dbase='mysql db'; //// specify database name
  9. $connection = mysql_connect("$localhost" , "$server user" , "$server pass") 
  10. or die ("Can't connect to MySQL");
  11. $db = mysql_select_db($dbase , $connection) or die ("Can't select database.");
  12. ?>
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'aeoranny'@'localhost' (using password: YES) in /home/aeoranny/public_html/wedlock/connect.php on line 10
Oct 2 '11 #1
1 1097
1,059 1GB
avoid double quotes(") to avoid, its unnecessary, and make sure your host, username, password is ok
make sure your username with the host name has the actual privileges to access your database.
Oct 17 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Kenneth Illingsworth | last post: by
reply views Thread by Kenneth Illingsworth | last post: by
3 posts views Thread by c_chen | last post: by
2 posts views Thread by Elmar Grandel | last post: by
6 posts views Thread by Justin.Voelker | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.