LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Failed to start database (mariadb.service) (https://www.linuxquestions.org/questions/linux-server-73/failed-to-start-database-mariadb-service-4175659769/)

jezo 08-25-2019 08:27 AM

Failed to start database (mariadb.service)
 
Hi,

I have a problem with maiadb.service and i am unable to start Mysql server. When I try to run it, I get the following error:

Redirecting to /bin/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.

The "systemctl status mariadb.service" returns me:

mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2019-08-25 15:19:23 CEST; 2min 52s ago
Process: 16972 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=1/FAILURE)

Aug 25 15:19:23 699.ablak.arnes.si systemd[1]: Starting MariaDB database server...
Aug 25 15:19:23 699.ablak.arnes.si systemd[1]: mariadb.service: control process exited, code=exited status=1
Aug 25 15:19:23 699.ablak.arnes.si systemd[1]: Failed to start MariaDB database server.
Aug 25 15:19:23 699.ablak.arnes.si systemd[1]: Unit mariadb.service entered failed state.
Aug 25 15:19:23 699.ablak.arnes.si systemd[1]: mariadb.service failed.

I tried to reinstal mariadb with following comand:

service mariadb stop
yum remove mariadb-server
cd /var/lib && rm -rfv mysql
yum -y install mariadb-server

But i couldnt remove it.

[root@699 lib]# service mariadb stop
Redirecting to /bin/systemctl stop mariadb.service
[root@699 lib]# yum remove mariadb-server
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package mariadb-server.x86_64 1:5.5.60-1.el7_5 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
mariadb-server x86_64 1:5.5.60-1.el7_5 @updates 58 M

Transaction Summary
================================================================================
Remove 1 Package

Installed size: 58 M
Is this ok [y/N]: Exiting on user command
Your transaction was saved, rerun it with:
yum load-transaction /tmp/yum_save_tx.2019-08-25.15-25.YpBWA4.yumtx

Thank you for your answers.

redd9 08-25-2019 04:26 PM

Quote:

But i couldnt remove it.
Code:

[root@699 lib]# service mariadb stop
Redirecting to /bin/systemctl stop mariadb.service
[root@699 lib]# yum remove mariadb-server
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package mariadb-server.x86_64 1:5.5.60-1.el7_5 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
mariadb-server x86_64 1:5.5.60-1.el7_5 @updates 58 M

Transaction Summary
================================================================================
Remove 1 Package

Installed size: 58 M
Is this ok [y/N]: Exiting on user command
Your transaction was saved, rerun it with:
yum load-transaction /tmp/yum_save_tx.2019-08-25.15-25.YpBWA4.yumtx


It looks like you may have pressed enter instead of 'Y'. Can you try to remove it again, but ensure you press 'Y'? Or if you did press 'y' earlier but got an error, can you post the error you got?

jezo 08-27-2019 10:00 AM

Thank you for the answer. I was thinking it might be the problem but when i enter the command I get all of the reply at once. I don't have the time or opportunity to enter y (yes).

redd9 08-27-2019 10:12 AM

Try
Code:

yum -y remove mariadb-server

berndbausch 08-27-2019 10:18 AM

When the server doesn't start, you may have information about the failure in the log files. They should be under /var/log/mysql.

jezo 08-28-2019 11:13 AM

Thank you for all the answers, it wors now (the solution from redd9).

Have a nice day,


All times are GMT -5. The time now is 12:13 PM.