Mariadb not starting question

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.

1 Like

@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

1 Like

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

2 Likes

@rahulsoni are we requested to install mariadb server?
Mariadb troubleshooting task.

@Borys
sudo vi /var/log/mariadb/mariadb.log
running this command opens a blank file.


Not able to start MariaDB service, any suggestions here?

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.

Freinds…can anyone help me on this.

peter

unable to switch user to peter.

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).

1 Like

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.

Nautilus DB1

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

@Lalit and @Inderpreet
i dont believ i have permission. I am unable to run as root also.

mariadb2 mariadb3

@yogendra you first need to login as root using sudo su - root and password of peter

@yogendra

See the very first error in the screenshot, I think you should get some hint from there.

1 Like