Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I use plesk 9.3, which is required by Serverloft. We are hosting on 24 websites on it. First, it said too many connection error, and then when I search the main problem.

The problem is:

Warning:  mysql_query() [function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/vhosts/ on line 23

The database user that the application should be using to connect is not named www-data, and does have a password.

Also, the MySQL performance is very low indeed.

I guess there is a configuration problem but it's a mystery for now.

Could you please help me about what can it be? How can this problem be solved?

share|improve this question
by the way, I'm running this on Ubuntu Server. –  Firavun Nov 28 '11 at 14:15
What's on line 23 of subdomains/test/httpdocs/pages.php? And where are the username and password defined that it's using? –  Shane Madden Nov 28 '11 at 15:59

2 Answers 2

up vote 0 down vote accepted

If you can somehow administer the MySQL server, try there command


Sometimes if there are too many connection errors between your application server and MySQL server, it refuses any further connections from that host.

share|improve this answer

If your mysql connection is done by www-data instead of an other user, check your configuration. You should define somewhere the MySQL user and password.

The performance issue is maybe linked, or you can check if your DNS working well from MySQL and from your Web server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.