Join the community today
Become a Member

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

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 1, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    59,284
    12,509
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,141
    Local Time:
    9:29 PM
    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

    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

    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.

    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/

    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/

    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


    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.

    Continue reading...

    Centmin Mod Github Master branch

    Master branch is where most recent commits are made as at May 24, 2015.