[opensuse] How to autostart MariaDB
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
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. # rpm -qa | grep mysql php5-pear-MDB2_Driver_mysql-1.4.1-14.1.1.noarch php5-mysql-5.4.20-4.1.x86_64 libmysqlclient18-5.5.33-2.2.x86_64 perl-DBD-mysql-4.021-6.1.3.x86_64 # rpm -qa | grep mariadb mariadb-client-5.5.33-2.2.x86_64 mariadb-5.5.33-2.2.x86_64 mariadb-tools-5.5.33-2.2.x86_64 mariadb-errormessages-5.5.33-2.2.x86_64 # 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. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). Well, I added /bin/systemctl start mysql.service to /etc/rc.d/boot.local and it works, but I think, this isn't the desired solution... ;-) Any idea why systemctl enable doesn't work? It worked fine for original MySQL. Have a nice day, Vojtěch -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/7891b1b1a5767f4b9ac1cc0723cebdac.jpg?s=120&d=mm&r=g)
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've been using mariadb for nearly twop years I think, auto-start works exactly as for mysql.
# 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. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...).
Yeah, that's a stupid error-message: https://bugzilla.novell.com/show_bug.cgi?id=859931 It's only a warning though, as far as I know. -- Per Jessen, Zürich (13.9°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a):
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've been using mariadb for nearly twop years I think, auto-start works exactly as for mysql.
It doesn't for me. :-(
# 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. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...).
Yeah, that's a stupid error-message:
https://bugzilla.novell.com/show_bug.cgi?id=859931
It's only a warning though, as far as I know.
Not in my case. Same problem I have with PostgreSQL. I have to start DBs manually in boot.local. With MySQL I hadn't had this problem before switching to MariaDB... All the best, Vojtěch -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne Ne 13. dubna 2014 11:10:08 jste napsal(a):
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
# 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. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...).
Yeah, that's a stupid error-message:
https://bugzilla.novell.com/show_bug.cgi?id=859931
It's only a warning though, as far as I know.
Not in my case. Same problem I have with PostgreSQL. I have to start DBs manually in boot.local. With MySQL I hadn't had this problem before switching to MariaDB...
https://bugzilla.novell.com/show_bug.cgi?id=840548 https://bugzilla.novell.com/show_bug.cgi?id=873334
All the best, Vojtěch
-- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/7891b1b1a5767f4b9ac1cc0723cebdac.jpg?s=120&d=mm&r=g)
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a):
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've been using mariadb for nearly twop years I think, auto-start works exactly as for mysql.
It doesn't for me. :-(
Okay, then we should investigate why it doesn't work. You know, look at log messages, systemctl output etc. I'm running mariadb on 12.3, not 13.1, but given that the init-script was not converted to a systemd unit yet, there should be no major difference. What does "systemctl status mysql.service" tell you when a start has failed? -- Per Jessen, Zürich (15.7°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne Ne 13. dubna 2014 13:26:35, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a):
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've been using mariadb for nearly twop years I think, auto-start works exactly as for mysql.
It doesn't for me. :-(
Okay, then we should investigate why it doesn't work. You know, look at log messages, systemctl output etc. I'm running mariadb on 12.3, not 13.1, but given that the init-script was not converted to a systemd unit yet, there should be no major difference.
What does "systemctl status mysql.service" tell you when a start has failed?
Nothing. When I use systemctl start mysql.service it starts as expected, so that there is IMHO no reason to other complains than those written by systemctl enable mysql.service... There is no error in MySQL logs. V. -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/7891b1b1a5767f4b9ac1cc0723cebdac.jpg?s=120&d=mm&r=g)
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 13:26:35, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a):
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've been using mariadb for nearly twop years I think, auto-start works exactly as for mysql.
It doesn't for me. :-(
Okay, then we should investigate why it doesn't work. You know, look at log messages, systemctl output etc. I'm running mariadb on 12.3, not 13.1, but given that the init-script was not converted to a systemd unit yet, there should be no major difference.
What does "systemctl status mysql.service" tell you when a start has failed?
Nothing.
No output from "systemctl status mysql.service" at all?? On a successful start, this is mine: # systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since Thu, 2014-04-10 09:37:27 CEST; 3 days ago Process: 17719 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/mysql.service 17801 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock --datadir=/srv/mysql 18192 /usr/sbin/mysqld --basedir=/usr --datadir=/srv/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/mysqld.log --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.... Apr 10 09:37:22 adenauer systemd[1]: Starting LSB: Start the MySQL database server... Apr 10 09:37:27 adenauer mysql[17719]: Starting service MySQL ..done Apr 10 09:37:27 adenauer systemd[1]: Started LSB: Start the MySQL database server.
When I use systemctl start mysql.service it starts as expected, so that there is IMHO no reason to other complains than those written by systemctl enable mysql.service... There is no error in MySQL logs. V.
No, your mysql setup is clearly working, so it's a systemd/startup issue. Is mysql enabled in sysvinit? "chkconfg mysql" ? If not, enable it. Maybe "systemctl enable mysql" did not in fact enable it, even if it said so. -- Per Jessen, Zürich (16.4°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne Ne 13. dubna 2014 14:22:10, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 13:26:35, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a):
Vojtěch Zeisek wrote: No output from "systemctl status mysql.service" at all?? On a successful start, this is mine:
# systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since Thu, 2014-04-10 09:37:27 CEST; 3 days ago Process: 17719 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/mysql.service 17801 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock --datadir=/srv/mysql 18192 /usr/sbin/mysqld --basedir=/usr --datadir=/srv/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/mysqld.log --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql....
Apr 10 09:37:22 adenauer systemd[1]: Starting LSB: Start the MySQL database server... Apr 10 09:37:27 adenauer mysql[17719]: Starting service MySQL ..done Apr 10 09:37:27 adenauer systemd[1]: Started LSB: Start the MySQL database serve
OK, nothing interesting. ;-) # systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since So 2014-04-12 16:42:01 CEST; 21h ago CGroup: /system.slice/mysql.service ├─4740 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql -- pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock -- datadir=/var/lib/mysql └─5112 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql -- plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log- error=/var/lib/mysql/botany.err --pid-file=/var/run/mysql/mysqld.pid -- socket=/var/run/mysql/mysql.sock dub 12 16:42:01 botany mysql[4429]: Starting service MySQL ..done dub 12 16:42:01 botany systemd[1]: Started LSB: Start the MySQL database server.
When I use systemctl start mysql.service it starts as expected, so that there is IMHO no reason to other complains than those written by systemctl enable mysql.service... There is no error in MySQL logs. V.
No, your mysql setup is clearly working, so it's a systemd/startup issue. Is mysql enabled in sysvinit? "chkconfg mysql" ? If not, enable it. Maybe "systemctl enable mysql" did not in fact enable it, even if it said so.
# chkconfig mysql mysql on I also checked yast runlevel editor and there mysql is enabled... Thank You, Vojtěch -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/7891b1b1a5767f4b9ac1cc0723cebdac.jpg?s=120&d=mm&r=g)
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 14:22:10, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 13:26:35, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a):
Vojtěch Zeisek wrote: No output from "systemctl status mysql.service" at all?? On a successful start, this is mine:
# systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since Thu, 2014-04-10 09:37:27 CEST; 3 days ago Process: 17719 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/mysql.service 17801 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock --datadir=/srv/mysql 18192 /usr/sbin/mysqld --basedir=/usr --datadir=/srv/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/mysqld.log --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql....
Apr 10 09:37:22 adenauer systemd[1]: Starting LSB: Start the MySQL database server... Apr 10 09:37:27 adenauer mysql[17719]: Starting service MySQL ..done Apr 10 09:37:27 adenauer systemd[1]: Started LSB: Start the MySQL database serve
OK, nothing interesting. ;-) # systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since So 2014-04-12 16:42:01 CEST; 21h ago CGroup: /system.slice/mysql.service ├─4740 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql -- pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock -- datadir=/var/lib/mysql └─5112 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql -- plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log- error=/var/lib/mysql/botany.err --pid-file=/var/run/mysql/mysqld.pid -- socket=/var/run/mysql/mysql.sock
dub 12 16:42:01 botany mysql[4429]: Starting service MySQL ..done dub 12 16:42:01 botany systemd[1]: Started LSB: Start the MySQL database server.
Okay, but what does it say after a failed automatic mysql start-up? That ought to be the interesting one.
Is mysql enabled in sysvinit? "chkconfg mysql" ? If not, enable it. Maybe "systemctl enable mysql" did not in fact enable it, even if it said so.
# chkconfig mysql mysql on
Okay. -- Per Jessen, Zürich (16.8°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne Ne 13. dubna 2014 14:58:22, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 14:22:10, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 13:26:35, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a): > Vojtěch Zeisek wrote: Okay, but what does it say after a failed automatic mysql start-up? That ought to be the interesting one.
The same: # 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. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). # systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since So 2014-04-12 16:42:01 CEST; 22h ago CGroup: /system.slice/mysql.service ├─4740 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql -- pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock -- datadir=/var/lib/mysql └─5112 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql -- plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log- error=/var/lib/mysql/botany.err --pid-file=/var/run/mysql/mysqld.pid -- socket=/var/run/mysql/mysql.sock dub 12 16:42:01 botany mysql[4429]: Starting service MySQL ..done dub 12 16:42:01 botany systemd[1]: Started LSB: Start the MySQL database server. V. -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/7891b1b1a5767f4b9ac1cc0723cebdac.jpg?s=120&d=mm&r=g)
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 14:58:22, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 14:22:10, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 13:26:35, Per Jessen napsal(a):
Vojtěch Zeisek wrote: > Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a): >> Vojtěch Zeisek wrote: Okay, but what does it say after a failed automatic mysql start-up? That ought to be the interesting one.
The same:
# 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. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). # systemctl status mysql.service mysql.service - LSB: Start the MySQL database server Loaded: loaded (/etc/init.d/mysql) Active: active (running) since So 2014-04-12 16:42:01 CEST; 22h ago
22 hours ago? So this was not a fresh reboot. If the info is going to be of any use, we need to see what happens when mysql is not started by systemd. -- Per Jessen, Zürich (14.4°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne Ne 13. dubna 2014 20:36:03, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 14:58:22, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 14:22:10, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 13:26:35, Per Jessen napsal(a): > Vojtěch Zeisek wrote: > > Dne Ne 13. dubna 2014 11:01:46, Per Jessen napsal(a): > >> Vojtěch Zeisek wrote: Okay, but what does it say after a failed automatic mysql start-up? That ought to be the interesting one.
The same:
# 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. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
# systemctl status mysql.service mysql.service - LSB: Start the MySQL database server
Loaded: loaded (/etc/init.d/mysql) Active: active (running) since So 2014-04-12 16:42:01 CEST; 22h ago
22 hours ago? So this was not a fresh reboot. If the info is going to be of any use, we need to see what happens when mysql is not started by systemd.
Yes, but the story is all the time the same. I just rebooted, it doesn't start, systemctl status just says it is exited, start it manually, no error... V. -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/7891b1b1a5767f4b9ac1cc0723cebdac.jpg?s=120&d=mm&r=g)
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 20:36:03, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
# systemctl status mysql.service mysql.service - LSB: Start the MySQL database server
Loaded: loaded (/etc/init.d/mysql) Active: active (running) since So 2014-04-12 16:42:01 CEST; 22h ago
22 hours ago? So this was not a fresh reboot. If the info is going to be of any use, we need to see what happens when mysql is not started by systemd.
Yes, but the story is all the time the same. I just rebooted, it doesn't start, systemctl status just says it is exited,
It is supposed to exit, doesn't it say anything else? What does this say: journalctl _SYSTEMD_UNIT=mysql.service -- Per Jessen, Zürich (0.0°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne Po 14. dubna 2014 08:34:23, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
Dne Ne 13. dubna 2014 20:36:03, Per Jessen napsal(a):
Vojtěch Zeisek wrote:
# systemctl status mysql.service mysql.service - LSB: Start the MySQL database server
Loaded: loaded (/etc/init.d/mysql) Active: active (running) since So 2014-04-12 16:42:01 CEST; 22h ago
22 hours ago? So this was not a fresh reboot. If the info is going to be of any use, we need to see what happens when mysql is not started by systemd.
Yes, but the story is all the time the same. I just rebooted, it doesn't start, systemctl status just says it is exited,
It is supposed to exit, doesn't it say anything else?
I think it correct, because if there is no command to start, there is no error to by logged, right?
What does this say:
journalctl _SYSTEMD_UNIT=mysql.service
No error, about starts and stops, upgrade, reboot and status of tables. Finally, it seems, that chkconfig mysql worked for second time, so it starts now. So it is fixed, thank You for all Your help. But still I think it should work by default by systemctl... Never mind. Thank You and have a nice day, Vojtěch -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux http://www.opensuse.org/ http://trapa.cz/
![](https://seccdn.libravatar.org/avatar/7891b1b1a5767f4b9ac1cc0723cebdac.jpg?s=120&d=mm&r=g)
Vojtěch Zeisek wrote:
What does this say:
journalctl _SYSTEMD_UNIT=mysql.service
No error, about starts and stops, upgrade, reboot and status of tables. Finally, it seems, that chkconfig mysql worked for second time, so it starts now. So it is fixed, thank You for all Your help.
Okay, so it probably was the chkconfig in the end. I'm glad we got it solved. -- Per Jessen, Zürich (0.0°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/67b438c860db877055c76af17dd05f98.jpg?s=120&d=mm&r=g)
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. -- Klaus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
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/
participants (3)
-
Klaus Vink Slott
-
Per Jessen
-
Vojtěch Zeisek