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

I tried to strip out mysqld_safe as you mentioned but unfortunately I still get a similar error:
# systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
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)

May 05 13:23:55 domain.com systemd[1]: Starting LSB: start and stop MariaDB...
May 05 13:23:55 domain.com mysqld[21831]: Starting MariaDB
May 05 13:23:55 domain.com systemd[1]: mariadb.service: Control process exited, code=exited status=1
May 05 13:23:55 domain.com systemd[1]: Failed to start LSB: start and stop MariaDB.
May 05 13:23:55 domain.com systemd[1]: mariadb.service: Unit entered failed state.
May 05 13:23:55 domain.com systemd[1]: mariadb.service: Failed with result 'exit-code'.

May you please take a look to my /etc/init.d/mariadb does it correct?
https://gist.github.com/mbnoimi/f67187ea9ee1e46eb32c568ba85025f5

/opt/mariadb-data/my.cnf
https://gist.github.com/mbnoimi/b9daceca0e0e21da86b048b9883c5edf

-- 
Best Regards,
Muhammad Bashir Al-Noimi
Skype+Telegram+GMail: mbnoimi