Welcome to Centmin Mod Community
Register Now

Beta Branch fix MariaDB MySQL server start up on reboot in CentOS 7 in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Nov 27, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    8:40 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    fix MariaDB MySQL server start up on reboot in CentOS 7 in 123.09beta01

    MariaDB MySQL server start up on reboot's chkconfig alias command linking mysql to mariadb service names seems to be broken by MariaDB YUM packages now. Previously command chkconfig mysql on would alias to mariadb service and create the appropriate systemd symlinks required for MariaDB MySQL server to start up after a server reboot. The chkconfig mysql on command is alias to systemctl enable mysql. But seems both chkconfig mysql on and systemctl enable mysql are broken and do not create the appropriate systemd symlinks

    systemd alias to mysql links to chkconfig mysql on
    Code (Text):
    systemctl enable mysql
    mysql.service is not a native service, redirecting to /sbin/chkconfig.
    Executing /sbin/chkconfig mysql on

    chkconfig mysql on does nothing now though

    while chkconfig mariadb on and systemctl enable mariadb work in creating symlinks properly
    Code (Text):
    chkconfig mariadb on
    Note: Forwarding request to 'systemctl enable mariadb.service'.
    Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
    Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
    Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

    Code (Text):
    systemctl enable mariadb
    Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
    Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
    Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

    when symlinks are properly setup to allow MariaDB MySQL server to start up on server reboot, you should see symlinks


    in /etc/systemd/system/
    Code (Text):
    ls -lah /etc/systemd/system/ | grep mariadb
    drwxr-xr-x   2 root root   99 Oct  8 06:52 mariadb.service.d
    lrwxrwxrwx   1 root root   39 Nov 27 10:29 mysqld.service -> /usr/lib/systemd/system/mariadb.service
    lrwxrwxrwx   1 root root   39 Nov 27 10:29 mysql.service -> /usr/lib/systemd/system/mariadb.service

    and in /etc/systemd/system/multi-user.target.wants/
    Code (Text):
    ls -lah /etc/systemd/system/multi-user.target.wants/ | grep mariadb
    lrwxrwxrwx   1 root root   39 Nov 27 10:29 mariadb.service -> /usr/lib/systemd/system/mariadb.service

    If symlinks don't exist on CentOS 7 install, just run
    Code (Text):
    systemctl enable mariadb

    and check for symlinks again

    Or update latest 123.09beta01 or higher code via cmupdate command, and run and exit centmin.sh once for automatic fix if symlink is missing centmin.sh will automatically fix it.

    So cmupdate, then change to /usr/local/src/centminmod, run centmin.sh and then exit
    Code (Text):
    cmupdate
    cmdir
    ./centmin.sh
    

    example of cmupdate
    Code (Text):
    cmupdate
    No local changes to save
    Updating 5f9abf8..fae171b
    Fast-forward
     centmin.sh                 |  2 +-
     inc/cpcheck.inc            | 10 +++++++++-
     inc/mariadb_install.inc    |  1 +
     inc/mariadb_install102.inc |  1 +
     inc/mariadb_install103.inc |  1 +
     inc/mariadb_install104.inc |  1 +
     inc/mariadb_upgrade101.inc |  2 +-
     inc/mariadb_upgrade102.inc |  2 +-
     inc/mariadb_upgrade103.inc |  2 +-
     inc/mariadb_upgrade104.inc |  2 +-
     10 files changed, 18 insertions(+), 6 deletions(-)
    


    Continue reading...

    123.09beta01 branch