Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6642257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:54:33+00:00 2026-05-25T23:54:33+00:00

I face with a strange problem yesterday. I have server running Debian with installed

  • 0

I face with a strange problem yesterday. I have server running Debian with installed PHP 4.4.4-8 and mysql 5.5.9. That server serves a several websites.
For some reason randomly I get that error “Access denied for user ‘www-data’@’localhost’ (using password: NO)” when I try to load the webpage.
If I hit refresh the page loads normally, but afer several clicks that message appears again. Username which that page use to connect to mysql server is not www-data.

Does anyone has faced similar problem ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:54:34+00:00Added an answer on May 25, 2026 at 11:54 pm

    www-data is the Debian user that runs apache and php. If you attempt a query when you don’t have a valid connection, php/mysql will attempt to create a connection using <unix-user>@localhost with no password. This is where www-data@localhost (using password:NO) is coming from.

    The most likely reason that this has started happening now (though it has been running fine for 2-years prior) is that your db load has increased to the point where some connections are unable to succeed (probably due to max_connections, or max_user_connections; though this can also result from other limits like memory, threads, etc). When this happens, your call to mysql_connect will emit an error message, and return FALSE. If you fail to detect this failure, then your next mysql call (probably mysql_query, or mysql_select_db) will attempt the connection to www-data@localhost — thus causing the problem you’re seeing.

    I suggest enabling error reporting, and error display (as suggested by @DarkMantis) :

    ini_set('error_reporting', E_ALL|E_STRICT);
    ini_set('display_errors', 1);
    

    Also, be sure that your call to mysql_connect is not preceded by a @ sign; and make sure to check the return value. It should look something like this:

    $cxn = mysql_connect('localhost','yourusername','yourpassword');
    if( $cxn === FALSE ) {  die('mysql connection error: '.mysql_error()); }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I face some problem on my script that I use PHP and jquery to
This is a pretty strange problem. I have a book that I have been
I face a strange problem including php files. Let me show you the code:
I've run into a rather strange problem. I have a div that is rotatable
At face value, it would seem that object initializers present a problem for .net
I face a strange problem to access some HtmlGenericControl which created in run time
I face a strange problem while I'm trying to document a project of mine.
I face the following strange problem while using JFileChooser package sandbox; import java.io.File; import
I face a problem with the function DATE_ADD in MySQL. My request looks like
I'm having a strange problem while using @font-face on IE9. I converted a TTF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.