IPSConfig can not connect to its database

Discussion in 'Installation/Configuration' started by jknight2014, Jan 21, 2015.

  1. jknight2014

    jknight2014 New Member

    I installed on Ubuntu 14.04 using the instructions here. Theres no errors while installing but I can not login. I am just told the username or password box is empty (its not)
    The apache log says:
    PHP:
     PHP Warning:  mysqli::mysqli(): (28000/1045): Access denied for user 'ispconfig'@'localhost' (using passwordYESin /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 70
    I checked a few config files mentioned in other posts. They all look right. And they all have the host set as 127.0.0.1. So I am missing something. Can someone help?
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Is mysql running? And can you login into mysql with the data from /usr/local/ispconfig/interface/lib/config.inc.php?
     
  3. jknight2014

    jknight2014 New Member

    yes and yes. However the fact that it says @localhost is a problem since the host is set to 127.0.0.1. I prefer to not use hostnames and this makes me think its not using the settings at that location
     
  4. jknight2014

    jknight2014 New Member

    I found that the installer did not give the ispconfig user any permissions. I fixed that and its working.

    Thanks for the replies.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    127.0.0.1 is localhost and and the ispconfig user has to exist for 127.0.0.1 and for localhost in the mysql.user database of the mysql server (at least the ispconfig installer adds it like this, so as long as you havent removed it manually, the record must exist for 127.0.0.1 and localhost).
     
  6. jknight2014

    jknight2014 New Member

    The installer also added the host as my FQDN. I removed that and added localhost and 127.0.0.1. I know they are the same but 127 does not require host lookups. It save time on each request. Its small but every little bit counts.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The permissions of the ispconfig user are defined in the mysql.db table, not in the mysql.user table, in mysql.user, all settings have to be "N". Do not set any permissions in mysql.user table for the ispconfig user to yes as this would open a security hole in your server.
     
  8. jknight2014

    jknight2014 New Member

    I am seeing that now, thanks. I am removing those permissions. Why does this set the database accessible from outside networks? Shouldent it just be localhost?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You did the opposite. "localhost" in a php - mysql connection means to use the mysql socket instead of the network stack. With your settings, you forced ispconfig and mysql to use the network stack instead of the faster socket connection and therefor you slow down your system.
     
  10. jknight2014

    jknight2014 New Member

    I looked into that and your correct. Although in practical application there is no difference in load time. Thanks for your help.
     

Share This Page