• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Autostart mysql on server reboot?

    Scheduled Pinned Locked Moved
    General
    2
    3
    466
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      iekozz
      last edited by

      Hi all,

      As some of you know, I installed a fog server with all your help here. Thanks again. However, when I restart my server, mysql is not running. I have to use systemctl restart mysql to enable it again. This is a bit annoying as you can imagine.

      I have tried to run chkconfig --level 345 mysqld on but I get the following:

      [root@localhost fogserver]# chkconfig --level 345 mysqld on
      Note: Forwarding request to 'systemctl enable mysqld.service'.
      Failed to execute operation: Invalid argument
      

      Also, should I run sudo mysql_secure_installation? Or will this cause issues with fog?

      I am running fog server 1.5.5 on centos os 7.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Sebastian Roth

        @iekozz To enable a service on boot in the systemd world you need to tun systemctl enable XXX - while XXX should be mariadb instead of mysqld. If it does not work you can try finding out what the service is actually called with the following command: systemctl list-units | grep -e "mysql" -e "maria"

        If you are wondering why the manual restart worked… This is because there are links set and stop, start, status and restart usually work fine with the other names.

        Also, should I run sudo mysql_secure_installation? Or will this cause issues with fog?

        If you are an experienced Linux user I would say mysql_secure_installation is a good way to go. But it will most probably cause issues as it forces you to set a proper password an so on. As you still seem new to the Linux world I would say leave that for another day when you have worked your way through. If you’re really keen to do it know, make sure you know at least where to change the mysql passwords in /var/www/html/fog/lib/fog/config.class.php and /opt/fog/.fogsettings!

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        I 1 Reply Last reply Reply Quote 1
        • I
          iekozz @Sebastian Roth
          last edited by

          @Sebastian-Roth Thanks again, that fixed it 🙂

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          184

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project