Hi Otto,

Am 23.01.17 um 14:46 schrieb Otto Kekäläinen:
> I've implemented systemd in Debian in
> https://anonscm.debian.org/git/pkg-mysql/mariadb-10.1.git/commit/?id=9ff0a57dcbce86031d654dd85edd5bfe8c795dfa
> based on the scripts shipped by upstream.
> 
> It also contains a mariadb@.service intended for the multi mysqld use case.
> Read more at: https://mariadb.com/kb/en/mariadb/systemd/
> 
> 
> Could you review it? And help test is works as expected?

the first thing I ran into was to use the wrong file location.

root@mariadb:~# ls -la /etc/mysql/mariadb.conf.d/myinstance1.cnf
-rw-r--r-- 1 root root 564 Jan 26 14:13
/etc/mysql/mariadb.conf.d/myinstance1.cnf
root@mariadb:~# systemctl status mariadb@instance1
* mariadb@instance1.service - MariaDB database server
   Loaded: loaded (/lib/systemd/system/mariadb@.service; enabled; vendor
preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Thu 2017-01-26 14:27:44 UTC; 2min
2s ago
           `- ConditionPathExists=/etc/mysql/conf.d/myinstance1.cnf was
not met

This wasn't obvious in the first place. After placing myinstance1.cnf
and myinstance2.cnf into /etc/mysql/conf.d/ it seems to work fine so far.

root@mariadb:~# systemctl start mariadb@instance1
root@mariadb:~# systemctl start mariadb@instance2
root@mariadb:~# netstat -tapn| grep mysql
tcp        0      0 0.0.0.0:3306            0.0.0.0:*
LISTEN      2117/mysqld
tcp        0      0 0.0.0.0:3307            0.0.0.0:*
LISTEN      2268/mysqld

Cheers, Jan.
-- 
Never write mail to <w...@spamfalle.info>, you have been warned!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M+ V- PS
PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++
------END GEEK CODE BLOCK------
# this is read by the standalone daemon and embedded servers
[server]

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld_instance1.pid
socket          = /var/run/mysqld/mysqld_instance1.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql/instance1
tmpdir          = /tmp
log_error       = /var/log/mysql/mysql_instance1-error.log
skip-external-locking
bind-address    = 0.0.0.0
# this is read by the standalone daemon and embedded servers
[server]

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld_instance2.pid
socket          = /var/run/mysqld/mysqld_instance2.sock
port            = 3307
basedir         = /usr
datadir         = /var/lib/mysql/instance2
tmpdir          = /tmp
log_error       = /var/log/mysql/mysql_instance2-error.log
skip-external-locking
bind-address    = 0.0.0.0

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to