LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-25-2019, 08:27 AM   #1
jezo
LQ Newbie
 
Registered: Aug 2019
Posts: 3

Rep: Reputation: Disabled
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.
 
Old 08-25-2019, 04:26 PM   #2
redd9
Member
 
Registered: Nov 2013
Location: Canada
Distribution: RHEL, Ubuntu
Posts: 212
Blog Entries: 1

Rep: Reputation: 82
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?
 
Old 08-27-2019, 10:00 AM   #3
jezo
LQ Newbie
 
Registered: Aug 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
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).
 
Old 08-27-2019, 10:12 AM   #4
redd9
Member
 
Registered: Nov 2013
Location: Canada
Distribution: RHEL, Ubuntu
Posts: 212
Blog Entries: 1

Rep: Reputation: 82
Try
Code:
 yum -y remove mariadb-server

Last edited by redd9; 08-27-2019 at 10:12 AM. Reason: Autocorrect fail
 
Old 08-27-2019, 10:18 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
When the server doesn't start, you may have information about the failure in the log files. They should be under /var/log/mysql.
 
Old 08-28-2019, 11:13 AM   #6
jezo
LQ Newbie
 
Registered: Aug 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for all the answers, it wors now (the solution from redd9).

Have a nice day,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: KDE Participating in Google Summer of Code 2019, MariaDB Releasing New Open-Source MariaDB Enterprise Server, CentOS Celebrates 15th B LXer Syndicated Linux News 0 02-28-2019 06:50 AM
abr 30 07:11:22 prueva systemd[1]: Failed to start MariaDB database server. hlord Linux - Newbie 1 04-30-2017 11:02 PM
Failed to start MariaDB database server. sadiq106 Linux - Newbie 6 11-10-2016 08:18 PM
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 01:59 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration