Default database host.

Discussion in 'Installation/Configuration' started by Udson Assis, Mar 4, 2022.

  1. Udson Assis

    Udson Assis Member

    Default database host.

    Friends, when installing Wordpress, it suggests using localhost as the database address, however, my ISPConfig only accepts changing it to

    I would like to make it possible with both and localhost.

    If it's not possible both ways, I prefer localhost.

    Can you help me how can I achieve this in ISPConfig?
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Are you using chrooted PHP-FPM? In that case, should be used.
    Udson Assis likes this.
  3. ahrasis

    ahrasis Well-Known Member

    Instead of just using either localhost or, you can also use this as well as it will automatically detect the right one to be used:
    define( 'DB_HOST', $_ENV{DATABASE_SERVER});
    Udson Assis likes this.
  4. Udson Assis

    Udson Assis Member

    I'm using FPM and chroot enabled.

    After all, which chroot is enabled? I turned it on but I don't know what it's for.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    PHP-FPM Chroot is a chroot environment for PHP-FPM. And from within that chroot, you can't access the MySQL socket as MySQL is outside of the chroot. So when you enable chrooting in PHP, you must use as MySQL hostname to connect to MySQL over the network. When you disable chrooting, then you can either use localhost or as MySQL hostname.
    Udson Assis likes this.

Share This Page