HI
I successfully started the mariadb service but could not find the reason for its failure , i checked the journalctl -xe logs but could not understand ,I was able to figure out that pre tasks was not failing and i executed it manually after which i started the service and it worked, can anyone tell the correct issue and solution please ?
Once you install the mariasb server or lets say any systemd service, you should be manually starting it.
I dont think its an issue.
@rahulsoni I was starting it manually but it was failing with error ExecStartPre failed , ExecStartPre was calling a script which i executed manually and then i again started the service manually and it worked.
I couldnt figure out why ExecStartPre was failing when starting the service at first time, if anyone has done that task successfully i want to know the issue
I have been done this task successful.
You need check log file of mariadb:
/var/log/mariadb/mariadb.log
and you find string - can’t start server: can’t create PID file: Permission denied
Solution:
Set owner mysql on folder: sudo chown mysql:mysql /var/run/mysqld and then restart service
Result:
sudo systemctl status mariadb.service
â—Ź mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2020-03-05 07:05:46 UTC; 6s ago
just remove the mariadb all the packages and reinstall, it will work
check logs using below command:
journalctl -u mariadb.service
it will show you the exact issue why the service is not starting.
Although if i ssh to “stdb01” with same user 'thor" it says permission denied.
Why do you want to “switch user to peter”?
HI @yogendra
You are trying to switch to user peter on jump host itself where it doesn’t exist. You need to SSH into DB server (stdb01).
Hi Inderpreet, i already worked with that method. I did SSH to “stdb01”, but it asks password for which i tried with “mjolnir123” and “Sp!dy”. But, it gives me below error. Please guide.
Hi @yogendra
SSH into DB server from jump host using command ssh peter@stdb01
and use password Sp!dy
, it should work.
Hi @Lalit and @Inderpreet
Please look this snip of logs received as per your command.
I see failed to start the service. nothing useful from other blogs. Please help.
check the permissions and ownership of /var/lib/mysql
See the very first error in the screenshot, I think you should get some hint from there.