On 05/05/2018 12:49 PM, Reindl Harald wrote:
Am 05.05.2018 um 11:43 schrieb Muhammad Bashir Al-Noimi:
May 03 04:54:01 domain.com systemd[1]: Starting LSB: start and stop
MariaDB...
May 03 04:54:01 domain.com mysqld[17145]: Starting MariaDB
May 03 04:54:01 domain.com mysqld[17145]:
.2018-05-03T01:54:01.525119Z mysqld_safe Logging to
'/var/lib/mysql/domain.com.err'.
May 03 04:54:01 domain.com mysqld[17145]: 2018-05-03T01:54:01.551305Z
mysqld_safe A mysqld process already exists
May 03 04:54:02 domain.com systemd[1]: mariadb.service: Control
process exited, code=exited status=1
May 03 04:54:02 domain.com systemd[1]: Failed to start LSB: start and
stop MariaDB.
May 03 04:54:02 domain.com systemd[1]: mariadb.service: Unit entered
failed state.
May 03 04:54:02 domain.com systemd[1]: mariadb.service: Failed with
result 'exit-code'.
How can I fix this issue?
IMPORTANT:
* In the attachments you can find *"/opt/mariadb-data/my.cnf"* AND
*"/etc/init.d/mariadb**files"*
* Ubuntu Linux 16.04.2 x64
* Downloaded mariadb-10.2.14-linux-x86_64.tar.gz
Sorry I didn't mention the source of MariaDB documentation
https://mariadb.com/kb/en/library/installing-mariadb-alongside-mysql/
just strip out mysqld_safe at all - we even don't ship it the last 7
years with out packages - since systemd supports "Restart=always" there
is no need for babysitting and you also don't need to fire up anything
as root - would at least have saved one critical secuirty issue in the past
for "Type=notify" you need to have systemd-devel installed at build-time
and it's recommended because After/Before works relieable and start
follow-up services when mysqld is really ready for connections
__________________
[root@srv-rhsoft:~]$ cat /usr/lib/systemd/system/mysqld.service
[Unit]
Description=MariaDB Database
Before=postfix.service dovecot.service dbmail-imapd.service
dbmail-lmtpd.service dbmail-pop3d.service dbmail-timsieved.service
[Service]
Type=notify
KillMode=process
KillSignal=SIGTERM
SendSIGKILL=no
User=mysql
Group=mysql
ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf
--pid-file=/dev/null
Environment="LANG=en_GB.UTF-8"
Restart=always
RestartSec=1
TimeoutSec=300
LimitNOFILE=infinity
LimitMEMLOCK=infinity
OOMScoreAdjust=-1000
TasksMax=2048
Thanks Reindl
root@hpc-tech:~# systemctl status mariadb.service
● mariadb.service - LSB: start and stop MariaDB
Loaded: loaded (/etc/init.d/mariadb; bad; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Sat 2018-05-05 13:23:55
+03; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 21831 ExecStart=/etc/init.d/mariadb start (code=exited,
status=1/FAILURE)