[SOLVED] Mariadb failed restart everytime

Issues related to applications and software problems
Locked
Ashish Sood
Posts: 9
Joined: 2015/05/20 19:28:10
Location: India

[SOLVED] Mariadb failed restart everytime

Post by Ashish Sood » 2015/05/20 19:37:04

Hi Everyone,

I tried a lot to fix the issues searched it on Google alot, now finally i think to post my problem here.

I want to install mysql server on my CENTOS 7 but i got to know that mysql packages is not available on CENTOS 7 for that i need to install mariadb packages, i did the same and install mariadb. please find the below installed packages.
[root@localhost ~]# rpm -qa|grep -i maria
mariadb-5.5.41-2.el7_0.x86_64
mariadb-server-5.5.41-2.el7_0.x86_64
mariadb-libs-5.5.41-2.el7_0.x86_64
Now when i am trying to start mariadb service its becomes failed.
[root@localhost ~]# systemctl start mariadb.service
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
Journal output
[root@localhost ~]# journalctl -xn
-- Logs begin at Wed 2015-05-20 20:36:50 IST, end at Thu 2015-05-21 01:05:11 IST. --
May 21 01:02:58 localhost.localdomain dbus[877]: [system] Successfully activated service 'org.freedesktop.hostname1'
May 21 01:02:58 localhost.localdomain systemd[1]: Started Hostname Service.
-- Subject: Unit systemd-hostnamed.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit systemd-hostnamed.service has finished starting up.
--
-- The start-up result is done.
May 21 01:03:45 localhost.localdomain chronyd[874]: Selected source 123.108.225.6
May 21 01:05:10 localhost.localdomain systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit mariadb.service has begun starting up.
May 21 01:05:10 localhost.localdomain mysqld_safe[47303]: 150521 01:05:10 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
May 21 01:05:10 localhost.localdomain mysqld_safe[47303]: 150521 01:05:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
May 21 01:05:11 localhost.localdomain mysqld_safe[47303]: 150521 01:05:11 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
May 21 01:05:11 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
May 21 01:05:11 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
May 21 01:05:11 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
help me its really very urgent.

Thanks in advance.

Regards
Ashish
Thanks,
Ashish

User avatar
TrevorH
Forum Moderator
Posts: 27125
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Mariadb failed restart everytime

Post by TrevorH » 2015/05/20 19:56:05

Did you look in /var/log/mariadb/mariadb.log?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Ashish Sood
Posts: 9
Joined: 2015/05/20 19:28:10
Location: India

Re: [SOLVED] Mariadb failed restart everytime

Post by Ashish Sood » 2015/05/20 23:49:57

Thanks for your reply TrevorH, my problem has been solved. below is the solution

1. I uninstalled the mariadb maridb-server packages
2. I removed the directory /var/lib/mysql.
3 Reinstalled the Mariadb, Mariadb-server packages.
4. systemct start mariadb; systemctl enable mariadb (problem solved).

Thanks,
Ashish Sood
Thanks,
Ashish

douglas_goodall
Posts: 1
Joined: 2015/09/01 13:39:15

Re: [SOLVED] Mariadb failed restart everytime

Post by douglas_goodall » 2015/09/01 13:49:17

Thank you Ashish Sood, for posting your problem. And thanks also to TrevorH for the solution.

I have been struggling with this same problem for many hours. It felt to me like there was some stale
configuration data lingering around, but I wasn't sure where.

This has been a big help to me. This is my first visit to the CentOS forum, but not my last.

User avatar
InitOrNot
Posts: 112
Joined: 2015/06/10 18:26:51

Re: [SOLVED] Mariadb failed restart everytime

Post by InitOrNot » 2015/09/01 21:38:00

Ashish Sood wrote:Thanks for your reply TrevorH, my problem has been solved. below is the solution

1. I uninstalled the mariadb maridb-server packages
2. I removed the directory /var/lib/mysql.
3 Reinstalled the Mariadb, Mariadb-server packages.
4. systemct start mariadb; systemctl enable mariadb (problem solved).
No offense intended (no trolling intended, neither), by this (i.e., the Linux ecosystem post-systemd) is starting to look suspiciously Windows-like more and more...

Locked

Return to “CentOS 7 - Software Support”