Install script does not recognize localhost but it does 127.0.0.1 in MySQL?

Discussion in 'ISPConfig 3 Priority Support' started by JohnnyBeGood, Oct 5, 2017.

  1. JohnnyBeGood

    JohnnyBeGood Member

    Hello,

    So I have Debian 9.1 and I downloaded VM image for this tutorial https://www.howtoforge.com/tutorial...-9-stretch-apache-bind-dovecot-ispconfig-3-1/
    I'm trying to install Centova Cast and install script for it throws an error when I enter localhost but as soon as I change it to 127.0.0.1 it connects and completes without any issue?
    My /etc/hosts file has this in it:
    Code:
    127.0.0.1    localhost
    MY PUBLIC IP HERE    debian.mydomain.com     debian
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    What am I missing in MySQL setup?

    TIA!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The hosts file is fine. Which mysql user did you use for this software install, a user that you created in ISPConfig or the root user or a different user.
     
  3. JohnnyBeGood

    JohnnyBeGood Member

    Thanks for the reply!

    Well, since Centova Cast is separate and not part of any website created in ISPconfig initially I tried just to create user and DB in ISPconfig and used that to populate fields in the install script. That was giving me error.
    Then I thought it was tied to the website so I used these commands to create DB and user:
    Code:
    CREATE DATABASE centovacastdb;
    GRANT ALL PRIVILEGES ON centovacastdb.* TO centovacastuser@localhost IDENTIFIED BY 'VERYsecretpassword';
    flush privileges;
    quit
    Tried that and it was giving error.
    It only went thru when I changed from localhost to 127.0.0.1 ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    MySQL databases and users are not bound to a website, ISPConfig is just doing in MySQL what you did manually. I use the same VM here for ISPConfig development here, I created a MySQL user and database and a login with:

    mysql -h localhost -u c0test -p

    works fine here. So there might be jst an issue in the installer of the app that you install. Another possibility might be that you executed that installer inside a jail environment that has no access to the MySQL socket file. But in any case, using 127.0.0.1 as database host is fine as well, so if it works like this, then I would use that.
     
  5. JohnnyBeGood

    JohnnyBeGood Member

    Thanks for the explanation!
    I just wanted to make sure it was configured properly before I move my personal from old Ubuntu server.
    Here's Centova Cast response regarding that:
     
    till likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thanks for posting their answer, it confirms my understanding of the issue and as they confirm as well that it is fine for their application to use the IP, then there should be no issues using it instead of localhost. The setup uses the default Debian socket path, but maybe that changed in Debian 9 and they did not support it yet.
     
  7. JohnnyBeGood

    JohnnyBeGood Member

    Got it. Thanks for the reply!
     

Share This Page