Learn about Centmin Mod LEMP Stack today
Register Now

Why defaults to MariaDB 10.3.x? For EL8 install.

Discussion in 'AlmaLinux 8 & Rocky Linux 8 Beta Testing' started by rdan, Sep 22, 2022.

Tags:
  1. rdan

    rdan Well-Known Member

    5,434
    1,395
    113
    May 25, 2014
    Ratings:
    +2,181
    Local Time:
    1:16 PM
    Mainline
    10.2
    MariaDB 10.3 support status
    Ends in 8 months (25 May 2023)

    10.6 is the only LTS version and Support status
    Ends in 3 years and 9 months
    (06 Jul 2026)

     
  2. wmtech

    wmtech Active Member

    165
    44
    28
    Jul 22, 2017
    Ratings:
    +125
    Local Time:
    7:16 AM
    I would also like to use 10.6.

    But I'll try if it's possible to change that using custom_config.
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,063
    427
    83
    May 31, 2014
    Ratings:
    +830
    Local Time:
    8:16 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    I think it's related to some big changes to the newer versions that some software may not work out of the box with the latest versions...
     
  4. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    Yes mentioned why and also noted about the support lifecycle at https://community.centminmod.com/threads/whats-new-in-mariadb-10-6.22194/#post-93470

    There's enough regression bugs in 10.4+ and higher to keep MariaDB busy as long as they're juggling MariaDB 10.7+ 1yr supported versions too.

    Also having same MariaDB 10.3 for EL8 makes data migration aspect easier from CentOS 7 as I use MariaBackup (MariaDB version of Percon Xtrabackup too) which ideally works if both source and destination servers use the same version of MariaDB server.
    Yes that is something you can test on EL8 right now too. Persistent config file /etc/centminmod/custom_config.inc overrides also need testing on EL8 right now too ;) it should not be hard to choose MariaDB 10.6 as the default yourself if you choose to.
     
  5. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
  6. wmtech

    wmtech Active Member

    165
    44
    28
    Jul 22, 2017
    Ratings:
    +125
    Local Time:
    7:16 AM
  7. wmtech

    wmtech Active Member

    165
    44
    28
    Jul 22, 2017
    Ratings:
    +125
    Local Time:
    7:16 AM
    I have to report that upgrade to 10.6 from default 10.3 installation was possible without problems.

    I also tried an install with 10.6 default (custom_config) and it worked flawlessly.

    Again, perfect work. Thank you, @eva2000 !
     
  8. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    Thanks for testing those configuration/steps :D
     
  9. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    Lucky MariaDB 10.6.10 has a fix for this https://jira.mariadb.org/browse/MDEV-29374 - another reason why I still use MariaDB 10.3 :)
     
  10. buik

    buik “The best traveler is one without a camera.”

    1,966
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,634
    Local Time:
    7:16 AM
    Mariadb 10.3 on EL8 support from Red Hat ends on May 2029.
    So if needed you could always use Red Hat own bits.
    Mariadb 10.3 from the Red Hat/Rocky/Alma repo as option in CMM8 is a plus for me anyway.

    As discussed earlier, Mariadb has gone its own way since version 10.4 and is no longer necessarily compatible with MySQL, though runs not necessarily always stable. And 'Also having same MariaDB 10.3 for EL8 makes data migration aspect easier from CentOS 7.'

    To that end, herewith a request to add Mariadb 10.3 from Red Hat @eva2000 as option to CMM8.
    So that there is always a stable Mariadb present in CMM8, as recommended by Red Hat with upstream EL8, with bug and security fix update support (even after 25 May 2023 till mid 2029) that is fully compatible with Mysql.
     
    Last edited: Sep 25, 2022
  11. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    That makes sense to do that :)
     
  12. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    Just tried this out on AlmaLinux 8 switching Centmin Mod official MariaDB YUM repo to native EL8 OS's Appstream module MariaDB 10.3 and seems ok. The minor version differences have gotten closer. IIRC when CentOS 8 was initially released, there was up to 6-9 minor version 10.3.xx differences between official MariaDB YUM repo 10.3 and native EL8 Appstream module MariaDB 10.3. But now the difference right now is 1 minor version 10.3.36 vs 10.3.35

    This is the native EL8 Appstream module MariaDB 10.3 on Centmin Mod 130.00beta01

    Native EL8 Appstream actually offers 10.3 and 10.5 - here 10.3 is enabled
    Code (Text):
    yum -q module list mariadb
    AlmaLinux 8 - AppStream
    Name                                        Stream                                          Profiles                                                       Summary                                         
    mariadb                                     10.3 [d][e]                                     client, galera, server [d]                                     MariaDB Module                                 
    mariadb                                     10.5                                            client, galera, server [d]                                     MariaDB Module                                 
    
    Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
    

    Installed EL8 Appstream modules
    Code (Text):
    rpm -qa mariadb-*
    mariadb-connector-c-config-3.1.11-2.el8_3.noarch
    mariadb-common-10.3.35-1.module_el8.6.0+3265+230ed96b.x86_64
    mariadb-gssapi-server-10.3.35-1.module_el8.6.0+3265+230ed96b.x86_64
    mariadb-errmsg-10.3.35-1.module_el8.6.0+3265+230ed96b.x86_64
    mariadb-server-utils-10.3.35-1.module_el8.6.0+3265+230ed96b.x86_64
    mariadb-server-10.3.35-1.module_el8.6.0+3265+230ed96b.x86_64
    mariadb-connector-c-3.1.11-2.el8_3.x86_64
    

    Code (Text):
    systemctl status mariadb
    ● mariadb.service - MariaDB 10.3 database server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
               └─migrated-from-my.cnf-settings.conf, notifyaccess.conf, openfileslimit.conf, protecthome.conf
       Active: active (running) since Mon 2022-09-26 00:50:57 UTC; 3s ago
         Docs: man:mysqld(8)
               https://mariadb.com/kb/en/library/systemd/
      Process: 496024 ExecStartPost=/usr/libexec/mysql-check-upgrade (code=exited, status=0/SUCCESS)
      Process: 495961 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mariadb.service (code=exited, status=0/SUCCESS)
      Process: 495937 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
     Main PID: 495999 (mysqld)
       Status: "Taking your SQL requests now..."
        Tasks: 23 (limit: 24752)
       Memory: 61.9M
       CGroup: /system.slice/mariadb.service
               └─495999 /usr/libexec/mysqld --basedir=/usr
    
    Sep 26 00:50:57 build.domain.com systemd[1]: Starting MariaDB 10.3 database server...
    Sep 26 00:50:57 build.domain.com mysql-prepare-db-dir[495961]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
    Sep 26 00:50:57 build.domain.com mysql-prepare-db-dir[495961]: If this is not the case, make sure the /var/lib/mysql is empty before running mysql-prepare-db-dir.
    Sep 26 00:50:57 build.domain.com mysqld[495999]: 2022-09-26  0:50:57 0 [Note] /usr/libexec/mysqld (mysqld 10.3.35-MariaDB) starting as process 495999 ...
    Sep 26 00:50:57 build.domain.com systemd[1]: Started MariaDB 10.3 database server.
    


    Though such a switch will mean centmin.sh menu option 11 submenus to upgrade to MariaDB 10.4, 10.5 and 10.6 and beyond would need changing to take into account native EL8 Appstream installed MariaDB 10.3
     
  13. buik

    buik “The best traveler is one without a camera.”

    1,966
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,634
    Local Time:
    7:16 AM
    A few options if you ask me. A Red Hat-based Mariadb option. That will be added to the menu. With possible later upgrades within the Red Hat upstream. Or 10.3 from Red Hat only as a form of backwards compatibility. For users who really can't upgrade in 8 months.

    In CMM8 only offer 10.3 from Red Hat. Since Mariab 10.3 will be EOL in 8 months. Won't be able to install it anymore either because they are removing it from their repo. Just as happened before with 10.1 and a case can be found on the forum.

    Upgrade from Red Hat 10.3 to Mariadb 10.3 or Mariadb higher should be possible because Red Hat backports the most. And Red Hat 10.3.5 includes most of Mariadb 10.3.6. And since Mariadb 10.3 is going EOL with Mariadb soon. Not much will change with Red Hat 10.3.5 until 2029. Probably security related or a block bug here or there.

    The script can see what version you are on at the start with if then. That shouldn't be too difficult.
     
  14. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    I assume you mean Redhat = AlmaLinux/RockyLinux native MariaDB? Yeah more I think about it EL8 using native MariaDB 10.3 Appstream module makes more sense from the get go. There's no longer that huge gap in minor 10.3 versions compared to official MariaDB 10.3 YUM repo provided version.
     
  15. buik

    buik “The best traveler is one without a camera.”

    1,966
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,634
    Local Time:
    7:16 AM
    Yes that's right.
    It's a double meaning and possibly confusing for an overall reader.
    Redhat/AlmaLinux/RockyLinux.

    And then it even goes a step further:
    Mariadb 10.3 from the creator Mariadb itself EOL in 8 months.
    But Mariadb 10.3 from 3th party Red Hat EOL in 7+ years.

    In the ordinary world, it should be equal or the other way around.
     
  16. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    Indeed it can be confusing for regular folks. More confusing is I haven't used native provided MariaDB in over a decade - always using official MariaDB YUM repos. So very confusing messaging in EL8 MariaDB AppStream module installed server for mysql-prepare-dir script it runs on MariaDB service starting
    Code (Text):
    systemctl status mariadb
    ● mariadb.service - MariaDB 10.3 database server
       Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/mariadb.service.d
               └─migrated-from-my.cnf-settings.conf, notifyaccess.conf, openfileslimit.conf, protecthome.conf
       Active: active (running) since Mon 2022-09-26 02:21:24 UTC; 18h ago
         Docs: man:mysqld(8)
               https://mariadb.com/kb/en/library/systemd/
      Process: 1909 ExecStartPost=/usr/libexec/mysql-check-upgrade (code=exited, status=0/SUCCESS)
      Process: 1846 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mariadb.service (code=exited, status=0/SUCCESS)
      Process: 1822 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS)
     Main PID: 1884 (mysqld)
       Status: "Taking your SQL requests now..."
        Tasks: 23 (limit: 24704)
       Memory: 45.9M
       CGroup: /system.slice/mariadb.service
               └─1884 /usr/libexec/mysqld --basedir=/usr
    
    Sep 26 02:21:23 build.domain.com systemd[1]: Starting MariaDB 10.3 database server...
    Sep 26 02:21:23 build.domain.com mysql-prepare-db-dir[1846]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
    Sep 26 02:21:23 build.domain.com mysql-prepare-db-dir[1846]: If this is not the case, make sure the /var/lib/mysql is empty before running mysql-prepare-db-dir.
    Sep 26 02:21:24 build.domain.com mysqld[1884]: 2022-09-26  2:21:24 0 [Note] /usr/libexec/mysqld (mysqld 10.3.35-MariaDB) starting as process 1884 ...
    Sep 26 02:21:24 build.domain.com systemd[1]: Started MariaDB 10.3 database server.
    

    Code (Text):
    journalctl -u mariadb --no-pager | tail -8
    
    Sep 26 20:47:43 build.domain.com systemd[1]: Stopping MariaDB 10.3 database server...
    Sep 26 20:47:44 build.domain.com systemd[1]: mariadb.service: Succeeded.
    Sep 26 20:47:44 build.domain.com systemd[1]: Stopped MariaDB 10.3 database server.
    Sep 26 20:47:44 build.domain.com systemd[1]: Starting MariaDB 10.3 database server...
    Sep 26 20:47:44 build.domain.com mysql-prepare-db-dir[37078]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
    Sep 26 20:47:44 build.domain.com mysql-prepare-db-dir[37078]: If this is not the case, make sure the /var/lib/mysql is empty before running mysql-prepare-db-dir.
    Sep 26 20:47:45 build.domain.com mysqld[37116]: 2022-09-26 20:47:45 0 [Note] /usr/libexec/mysqld (mysqld 10.3.35-MariaDB) starting as process 37116 ...
    Sep 26 20:47:45 build.domain.com systemd[1]: Started MariaDB 10.3 database server.
    

    particularly for the message
    Seems native EL9 Appstream module MariaDB service file triggers a script at /usr/libexec/mysql-prepare-db-dir. See el8 native appstream mariadb 10.3

    Code (Text):
    ExecStartPre=/usr/libexec/mysql-check-socket
    # '%n' expands to 'Full unit name'; man systemd.unit
    ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n
    # MYSQLD_OPTS here is for users to set in /etc/systemd/system/mariadb@.service.d/MY_SPECIAL.conf
    # Note: we set --basedir to prevent probes that might trigger SELinux alarms,
    # per bug #547485
    ExecStart=/usr/libexec/mysqld --basedir=/usr $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
    ExecStartPost=/usr/libexec/mysql-check-upgrade
    


    It just checks if /var/lib/mysql data directory exists and is initialized for the first time. But if /var/lib/mysql data directory exists it gives this pointless message. Have you read of noobs reading that and mistakenly followed those instructions and deleted their MySQL data directory at /var/lib/mysql?
     
  17. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x
    I plan to override that messaging in EL8 Appstream module native MariaDB 10.3 to not confuse noobs into mistakenly deleting their MySQL data directories :)

    Added a new Terraform wrapper script profile for privately testing Centmin Mod initial installs on EL8 with native Appstream module MariaDB 10.3. Once I work out the initial kinks will merge this new code into 130.00beta01 so folks here can test it out.

    Code (Text):
    ./terraform_cmm.sh
    
    Usage:
    
    Fresh OS Only
    
    ./terraform_cmm.sh el7 plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el7 apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8 plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8 apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9 plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9 apply host.domain.com 40USD destroy-after
    
    RockyLinux 8
    
    ./terraform_cmm.sh el8-rocky8 plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-rocky8 apply host.domain.com 40USD destroy-after
    
    RockyLinux 8 to 9 Conversion
    
    ./terraform_cmm.sh el9-rocky9 plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-rocky9 apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-rocky9-sysbench plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-rocky9-sysbench apply host.domain.com 40USD destroy-after
    
    Fresh OS Only + sysbench
    
    ./terraform_cmm.sh el7-sysbench plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el7-sysbench apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-sysbench plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-sysbench apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-sysbench plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-sysbench apply host.domain.com 40USD destroy-after
    
    Launch Pre-Built Centmin Mod Installation
    
    ./terraform_cmm.sh el7-cmm plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el7-cmm apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-cmm plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-cmm apply host.domain.com 40USD destroy-after
    
    Install Centmin Mod
    
    ./terraform_cmm.sh el7-cmm-install plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el7-cmm-install apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-rocky plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-rocky apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-cmm-install plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-cmm-install apply host.domain.com 40USD destroy-after
    
    Install Centmin Mod with Appstream MariaDB 10.3 For EL8
    
    ./terraform_cmm.sh el8-cmm-install-appstream plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-appstream apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-rocky-appstream plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-rocky-appstream apply host.domain.com 40USD destroy-after
    
    Install Centmin Mod + Build RPMs
    
    ./terraform_cmm.sh el7-cmm-install-buildrpms plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el7-cmm-install-buildrpms apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-buildrpms plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-buildrpms apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-buildrpms-rocky plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el8-cmm-install-buildrpms-rocky apply host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-cmm-install-buildrpms plan host.domain.com 40USD destroy-after
    ./terraform_cmm.sh el9-cmm-install-buildrpms apply host.domain.com 40USD destroy-after
    

    Terraform making automated testing a lot easier :D
     
  18. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    3:16 PM
    Nginx 1.25.x
    MariaDB 10.x