Want more timely Centmin Mod News Updates?
Become a Member

Install Mariadb 10.1 or 10.2 with centmin mod.

Discussion in 'Install & Upgrades or Pre-Install Questions' started by hellenic, Mar 28, 2019.

  1. hellenic

    hellenic New Member

    20
    4
    3
    Mar 4, 2019
    Ratings:
    +5
    Local Time:
    7:29 AM
    1.15.9
    10.1.38
    Please fill in any relevant information that applies to you:
    • CentOS Version: Centos7
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: i.e. 1.15.3
    • PHP Version Installed: i.e. 5.6.37, 7.0.31, 7.1.21, 7.2.9
    • MariaDB MySQL Version Installed: i.e. 10.0.x or 10.1.xx or 10.2.xx
    • When was last time updated Centmin Mod code base ? : i.e. run centmin.sh menu option 23 submenu option 2 or cmupdate command
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      NSD_INSTALL='n'
      NGINX_SUB='n'
      NGINX_ADDITION='n'
      NGINX_IMAGEFILTER='n'
      NGINX_HTTPCONCAT='n'
      NGINX_PAGESPEED='n'
      NGINX_DYNAMICTLS='y'
      CLOUDFLARE_ZLIB='y'
      CLOUDFLARE_ZLIBPHP='y'
      PHP_TUNING='n'
      PHP_OVERWRITECONF='n'
      AUTOTUNE_CLIENTMAXBODY='n'
      DISABLE_IPVSIX='y'
      ENABLEMOTD='n'
      MARIADB_INSTALLTENTWO='y'
      
    Hi. I have a source which is rather old so when i upgraded from mariadb 10.1 to 10.3 i got alot of errors (mysql puked etc..)
    I even got this errors on fresh install of that source.

    So i tried to fresh install again the server with centmin mod but i got the new version of mariadb.

    What i want to do is install mariadb 10.1 or 10.2 (to test the source) but not the 10.3 version because the source code doesn't worked.

    I used this command on the config:
    Code:
    MARIADB_INSTALLTENTWO='y'
    Still it installs the 10.3 version.

    How can i make it install 10.1 or 10.2 version?
     
  2. Jimmy

    Jimmy Well-Known Member

    1,570
    321
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +811
    Local Time:
    12:29 AM
    1.15.x
    MariaDB 10.3.x
    https://community.centminmod.com/threads/set-mariadb-10-3-enable-php-fpm-systemd-service-defaults-in-123-09b….16994/#post-72004

    Code:
    set mariadb 10.3 & enable php-fpm systemd service defaults in 123.09beta01
    
    - time has come to make 123.09beta01 fresh installs default to using mariadb 10.3 as default via MARIADB_INSTALLTENTHREE='y' and also for centos 7 installs to switch php-fpm service file from init.d based to systemd based via SWITCH_PHPFPM_SYSTEMD='y' outlined at https://community.centminmod.com/threads/16511/
    - if you want new installs to use old default mariadb 10.1, set in persistent config file /etc/centminmod/custom_config.inc the variable MARIADB_INSTALLTENTHREE='n' BEFORE initial centmin mod install
    - if you want new installs to use old php-fpm via init.d service file on centos 7 installs, set in persistent config file /etc/centminmod/custom_config.inc the variable SWITCH_PHPFPM_SYSTEMD='n' BEFORE initial centmin mod install
    Code:
    MARIADB_INSTALLTENTHREE='n'
    Code:
    ################################################################
    ####
    #### CUSTOM CONFIG USED FOR CMM INSTALL
    ####
    ################################################################
    
    https://community.centminmod.com/posts/63839/
    
    
        # mkdir -p /etc/centminmod/
     
        # nano /etc/centminmod/custom_config.inc
     
        Add pre-install custom config.
     
        Check the custom_config.inc file for contents.
     
        # cat /etc/centminmod/custom_config.inc
     
     
        CMM INSTALL ROUTINES
        ##############################################################
     
        PHP 7.3 Install
        # yum -y update; curl -O https://centminmod.com/betainstaller73.sh && chmod 0700 betainstaller73.sh && bash betainstaller73.sh
    
        PHP 7.2 Install
        # yum -y update; curl -O https://centminmod.com/betainstaller72.sh && chmod 0700 betainstaller72.sh && bash betainstaller72.sh
    
        PHP 7.1.8 Install
        # yum -y update; curl -O https://centminmod.com/betainstaller71.sh && chmod 0700 betainstaller71.sh && bash betainstaller71.sh
    
        BASE INSTALL
        # yum -y update; curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh
    Code:
    Only on systems which are pre 10.3 default setup:
    ENABLE_MARIADBTENTWOUPGRADE='y' # mariadb upgrade to 10.2 from 10.1
    ENABLE_MARIADBTENTHREEUPGRADE='y' # mariadb upgrade to 10.3 from 10.2
     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    41,106
    9,200
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,111
    Local Time:
    2:29 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    yup do that before initial install to install mariadb 10.1 by default

    then set this after initial install and use centmin.sh menu option 11, submenu option 6 to update from mariadb 10.1 to 10.2

    curious, can you post an example of the errors you got and install commands used ?
     
  4. eva2000

    eva2000 Administrator Staff Member

    41,106
    9,200
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,111
    Local Time:
    2:29 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  5. hellenic

    hellenic New Member

    20
    4
    3
    Mar 4, 2019
    Ratings:
    +5
    Local Time:
    7:29 AM
    1.15.9
    10.1.38
    The errors has nothing to do with your script. The source code i was trying to use is very old and i got something like mysql puked user_likes doesn't have a default value.

    Not sure about that now because i already moved on. Not going to use that source. Too much troubles :)

    Thank you very much both of you for helping me out.
     
    • Like Like x 1
    • Informative Informative x 1
  6. eva2000

    eva2000 Administrator Staff Member

    41,106
    9,200
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,111
    Local Time:
    2:29 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Might be related to innodb_strict_mode outlined below, though that was enabled in MariaDB 10.2.2+ by default. So there's a possibility you'd run into this for your old script's mysql sql statements which aren't really valid sql but earlier mysql versions let it slide while newer versions are more strict. So updating the sql query syntax and database table structure to valid expected format would be best.

    Upgrade MariaDB 10.1 To 10.2 & 10.2 To 10.3 Differences



    MariaDB 10.1 to 10.2 has changes you need to be aware of which may affect your script/mysql using app specifically and Centmin Mod may not have tested for it so read Upgrading from MariaDB 10.1 to MariaDB 10.2 (centmin.sh menu option 11 takes care of step 1 to 8 with exception of step 4, you need to do MySQL backups yourself) and inspect /etc/my.cnf before and after MariaDB 10.2 upgrades. Centmin Mod upgrade routines try to as best adjust /etc/my.cnf for MariaDB 10.2 compatibility with previous MariaDB 10.1 but if your web app/scripts have issues, you'll need to figure those out yourself.

    Same goes for MariaDB 10.2 to 10.3 upgrades Upgrading from MariaDB 10.2 to MariaDB 10.3 (centmin.sh menu option 11 takes care of step 1 to 8 with exception of step 4, you need to do MySQL backups yourself)

    One of the big changes is from MariaDB 10.2.2 and newer, innodb_strict_mode is enabled by default while previously it was disabled by default and default options for sql_mode have changed.
     
  7. eva2000

    eva2000 Administrator Staff Member

    41,106
    9,200
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,111
    Local Time:
    2:29 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    maybe this link might give you ideas for modifying the sql/database table structure Field 'tx_generic_gallery_predefined' doesn't have a default value · Issue #8 · fnagel/generic-gallery. Though you have moved away from that old script, this post might be useful to others :D

    mariadb 10.3 enables STRICT_TRANS_TABLES for sql_mode
    Code (Text):
    mysqladmin var | grep sql_mode  | awk -F '|' '{print $2"="$3}' | xargs
    sql_mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    

    though mariadb 10.2.4+ does too according to https://mariadb.com/kb/en/library/sql-mode/
    or if using MariaDB 10.3 disable STRICT_TRANS_TABLES from sql_mode by removing it's listing in /etc/my.cnf set
    Code (Text):
    sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    

    and restart mysql. But doing this would cause future issues if you have other apps which have invalid syntax/data structures to be continually ignored.
     
    Last edited: Mar 29, 2019
    • Agree Agree x 1
    • Informative Informative x 1