Hi Dne Ne 13. dubna 2014 16:10:16, Klaus Vink Slott napsal(a):
Hi Vojtěch
On 13-04-2014 10:29, Vojtěch Zeisek wrote:
Hi, after upgrade of our server to 13.1 I finally decided to switch from MySQL to MariaDB. I uninstalled MySQL packages and installed MariaDB. No problem, it works fine, including automysqlbackup and other tools. I just wonder how to start the DB automatically during computer boot.
I am just investigating the same problem at the moment. I have one 13.1 machine which was upgraded yesterday. After reboot mariadb was not started - I could have sworn that the machine had been restarted previously without problems. Unfortunately this is a production machine so I can not take it down more than necessary.
Today I made a clean install on a test unit and installed mariadb on top. I did start the database and did the mysql_secure_installation.
Then I tried to enable mysql but I got the same message as you did:
# systemctl enable mysql.service mysql.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig mysql on The unit files have no [Install] section.
I rebooted anyway and after the reboot mysql (mariadb) was running again!
blog:~ # systemctl disable mysql.service mysql.service is not a native service, redirecting to /sbin/chkconfig. Executing /sbin/chkconfig mysql off
No errors so reboot..
blog:~ # systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: inactive (dead)
Now executing "/sbin/chkconfig mysql on", another reboot and mysql is up running. Did you actually reboot or did you just assume it did not work due to the error message?
So using chkconfig seems to works on my test rig, but am not convinced. chkconfig om both machines shows mysql is set to start - but yesterday it did not do so on the production unit.
It seems chkconfig worked on next try, now it starts during the boot. It didn't for first time, but now on second boot it does. So it seems to be fixed, but it should IMHO work using systemctl. Al the best, Vojtěch -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/