Ispconfig and Mysql 8

Discussion in 'General' started by lnxgs, Nov 29, 2020.

  1. lnxgs

    lnxgs Member

    Hello,
    I see that I get some error in Mysql version 8 about date.
    For example the ftp user authentication fails due to a date error:

    use dbispconfig;
    SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="myuser" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW());
    ERROR 1525 (HY000): Incorrect DATETIME value: '0000-00-00 00:00:00'


    If I show variables, I get:
    mysql> SHOW VARIABLES LIKE 'sql_mode' ;
    +---------------+-----------------------------------------------------------------------------------------------------------------------+
    | Variable_name | Value |
    +---------------+-----------------------------------------------------------------------------------------------------------------------+
    | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
    +---------------+-----------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.01 sec)

    So I create a file called /etc/mysql/mysql.conf.d/50-mysql.cnf and I put:
    [mysqld]
    sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

    And restart mysql service.

    So now I get
    mysql> SHOW VARIABLES LIKE 'sql_mode' ;
    +---------------+------------------------------------------------------------------------------------------+
    | Variable_name | Value |
    +---------------+------------------------------------------------------------------------------------------+
    | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
    +---------------+------------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)

    This fixed the problem. I hope it will be solved in the future by Ispconfig.

    Regards,
    L.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Does your version of ISPConfig support mysql 8? I believe recent ISPConfig versions support MariaDB. May depend on OS, though.
     
  3. lnxgs

    lnxgs Member

    We have last ISPConfig 3.2.1 on Ubuntu 20.04.1 LTS, Nginx 1.18.0 (Ubuntu), Mysql ver 8.0.22-0ubuntu0.20.04.2 and PHP 7.4.3.
    The only thing does not work is Rouncube but it's not so important.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The Ubuntu 20.04 Perfect Server Guide states
    so it may be mariadb is at least the suggested database, not sure if mysql is supported. I remember past discussions where it was stated that mysql is not supported, and mariadb must be used, but I do not remember if they were about Ubuntu 20.04.
     
  5. lnxgs

    lnxgs Member

    The only, which I found, for Ubuntu 20.04 is the guide about Apache, PHP, MariaDB, PureFTPD, BIND, Postfix, Dovecot and ISPConfig 3.2 (Beta) so I mixed the Debian guide for Nginx with the guide for Ubuntu with Apache.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    MySQL 8 is supported, but it's not that compatible which is predecessors that cause issues in many applications. For that reason, I prefer MariaDB now over MySQL. But the above issue is a bug in the current ISPConfig version, the SQL queries need to be adjusted to be compatible with MySQL 8. I'll add it to the issue tracker.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page