mysqlAccess denied for user 'www-data'@'localhost'

Discussion in 'Installation/Configuration' started by Pasco, Dec 26, 2006.

  1. Pasco

    Pasco Member

    Hi 2gether

    I just set up a fresh debian 3.1. ISPConfig Server.

    I've installed the database patch, so I could give my own names for databases and database users. (

    Then I applied the mysql 4.1 update & recompiled php. Now my databases in ISPConfig "have gone". That means I couldn't see them anymore in the ISPConfig Panel, but they still existed of course. ISPConfig still counts the old databases. If the web can have for example 2 databases and it already had 2 databases, I can't add new databases, because it says i has reached the web's maximum for databases already, even though I can't see and access them via ISPConfig Panel anymore.. :-(.

    So my (bad) idea was to erase the databases through phpmysql and create new ones in ISPConfig Panel...So I did.

    Now I have big problems with my websites. One of my website show's this error now:

    Warning: mysql_query(): Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/web9/web/news/default.php on line 76

    Warning: mysql_query(): A link to the server could not be established in /var/www/web9/web/news/default.php on line 76
    Access denied for user 'www-data'@'localhost' (using password: NO)

    Can anybody help me solve these issues? 1. the database thing: how can I bring ISPConfig to show the "old" database entries and how can I give apache the right back for accessing mysql? (what have I done?!? :confused: )

    Thanks so much for your very appreciate help!
    so long
    [email protected]
  2. Pasco

    Pasco Member

    OK, I've performed an update on ISPConfig Server, the main problem with the mysql no access from apache is solved :).

    But how can I show up the databases in ISPConfig again and erase the old empty database entries in ISPConfig Panel?
  3. Pasco

    Pasco Member

    NO, it's not good. That was a wrong statement....I still got all the problems...the update doesn't help... :-(
  4. Hans

    Hans Moderator ISPConfig Developer

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This problem is not realted dierctly to ISPConfig, your script tries to access the mysql database as user www-data without a password. Please edit your php script to use a existing mysql user and password to connect. It is very insecure to connect with www-data without a password.

    To your Problem that ISPConfig is not showing any databases, the patch you applied is not supported and it might be that it dont work anymore.

    I recommend to reinstall ISPConfig as hans suggested to remove this patch from your installation. You can not reimport databases to be shown in ISPConfig when the original ISPConfig database does not contain the correct data due to a patch.

Share This Page