Good morning Muhammad,
I have checked and I am using your mariadb.service file. For some reason, mariadb is failing to start. We need to determine if the issue is coming from systemd or something in MariaDB datadir.
To start it without systemd, run:
/opt/mariadb/bin/mysqld --defaults-file=/opt/mariadb-data/my.cnf &
The below should work:
/opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p version
/opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p shutdown
If the above does not work, you need to re-initialise mariadb:
kill the mysqld running as mariadb user.
cd /opt/mariadb-data
cp -p my.cnf /tmp
rm -rf *
cp -p /tmp/my.cnf .
rm -rf * # Attention data loss step
cd /opt/mariadb-10.2.14-linux-x86_64/
scripts/mysql_install_db --user=mariadb --defaults-file=/opt/mariadb-data/my.cnf
Otherwise its a systemd issue:
In that case can you provide the output of the following commands:
systemctl status mariadb
systemctl start mariadb
ps -ef | grep mysql
systemctl status mariadb
Hope this helps
Kenneth