By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 1,960 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

Mysql error

P: 1
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
Share this Question
Share on Google+
1 Reply

P: 1,059
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.