LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-02-2014, 06:26 PM   #1
UltrasonicMadness
Member
 
Registered: Jul 2013
Location: European Union
Distribution: Fedora 20 Xfce Spin
Posts: 43

Rep: Reputation: Disabled
MariaDB server refuses to start


Hi LinuxQuestions.

I have been trying to set up a local server and I have been having problems starting mariadb. I have followed some tutorials and, as a result, seem to have created an error. When I try to start the mariadb service (service mariadb start), I get this.

Code:
Redirecting to /bin/systemctl start  mariadb.service
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
When I type 'systemctl status mariadb.service', I get this:

Code:
mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled)
   Active: failed (Result: exit-code) since Mon 2014-06-02 22:48:58 BST; 33min ago
  Process: 10042 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
  Process: 10041 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
  Process: 10013 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 10041 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/mariadb.service

Jun 02 22:48:56 ultrasonicfortress mysqld_safe[10041]: 140602 22:48:56 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Jun 02 22:48:56 ultrasonicfortress mysqld_safe[10041]: 140602 22:48:56 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jun 02 22:48:58 ultrasonicfortress mysqld_safe[10041]: 140602 22:48:58 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Jun 02 22:48:58 ultrasonicfortress systemd[1]: mariadb.service: control process exited, code=exited status=1
Jun 02 22:48:58 ultrasonicfortress systemd[1]: Failed to start MariaDB database server.
Jun 02 22:48:58 ultrasonicfortress systemd[1]: Unit mariadb.service entered failed state.
There were permission errors around /var/log/mariadb/mariadb.log, which I fixed by changing the 'owner' of mariadb.log from root to mysql.

The result of 'journalctl -xn' is:

Code:
-- Logs begin at Mon 2014-05-05 14:27:12 BST, end at Mon 2014-06-02 23:18:13 BST. --
Jun 02 23:01:01 ultrasonicfortress run-parts[10324]: (/etc/cron.hourly) starting mcelog.cron
Jun 02 23:01:01 ultrasonicfortress run-parts[10329]: (/etc/cron.hourly) finished mcelog.cron
Jun 02 23:18:12 ultrasonicfortress systemd[1]: Starting dnf makecache...
-- Subject: Unit dnf-makecache.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit dnf-makecache.service has begun starting up.
Jun 02 23:18:13 ultrasonicfortress dnf[10445]: Config time: 0.019
Jun 02 23:18:13 ultrasonicfortress dnf[10445]: cachedir: /var/cache/dnf/i386/20
Jun 02 23:18:13 ultrasonicfortress dnf[10445]: dnf version: 0.5.2
Jun 02 23:18:13 ultrasonicfortress dnf[10445]: Making cache files for all metadata files.
Jun 02 23:18:13 ultrasonicfortress dnf[10445]: Metadata cache refreshed recently.
Jun 02 23:18:13 ultrasonicfortress dnf[10445]: Cleaning up.
Jun 02 23:18:13 ultrasonicfortress systemd[1]: Started dnf makecache.
-- Subject: Unit dnf-makecache.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit dnf-makecache.service has finished starting up.
-- 
-- The start-up result is done.
I would ultimately like to try out web applications like Simple Machines Forum on this server.

Best regards, and thank you in advance
UltrasonicMadness
 
Old 06-03-2014, 06:36 AM   #2
UltrasonicMadness
Member
 
Registered: Jul 2013
Location: European Union
Distribution: Fedora 20 Xfce Spin
Posts: 43

Original Poster
Rep: Reputation: Disabled
Forgot to ask a coherent question.

How do I reset the database settings to default or fix this problem? I ask because I don't know of any equivalent to 'apt-get purge' with yum.

Thanks again
UltrasonicMadness
 
Old 06-03-2014, 11:14 AM   #3
potato_farmer
Member
 
Registered: May 2014
Posts: 55

Rep: Reputation: Disabled
If you do not have any databases you need to back up, you can simply run the following as root:

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

This should give you a clean copy of mariadb-server.

Edit: As UltrasonicMadness correctly pointed out, he was using mariadb, not mysql. Renamed "mysql" to "mariadb".

Last edited by potato_farmer; 06-03-2014 at 12:29 PM.
 
Old 06-03-2014, 11:33 AM   #4
UltrasonicMadness
Member
 
Registered: Jul 2013
Location: European Union
Distribution: Fedora 20 Xfce Spin
Posts: 43

Original Poster
Rep: Reputation: Disabled
Thank you. I had to amend some of the steps because of the nature of the problem (service wouldn't start, therefore stopping wasn't needed) and the fact that I was using MariaDB, which is a fork of MySQL.

I ran this as root:

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

This may come off as overly pedantic but I would like this thread to assist others and not just waste space on the LQ servers. Removing the -y from yum install was just a personal preference.

Thanks again
UltrasonicMadness
 
Old 09-29-2015, 01:39 PM   #5
remymuhire250
LQ Newbie
 
Registered: Sep 2015
Posts: 1

Rep: Reputation: Disabled
changing the 'owner' of mariadb.log from root to mysql

Please can you help with the linux command for changing the 'owner' of mariadb.log from root to mysql.

Last edited by remymuhire250; 09-29-2015 at 01:41 PM. Reason: error
 
Old 09-29-2015, 08:49 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,699

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
@remymuhire250: please start a new thread; this one is over a year old and has been marked as SOLVED already...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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: Install LEMP Server (nginx, MySQL or MariaDB, PHP) On Ubuntu 13.10 Server LXer Syndicated Linux News 0 10-24-2013 06:40 AM
LXer: Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 Server LXer Syndicated Linux News 0 10-22-2013 04:50 AM
[SOLVED] MySQL, MariaDB, Perconal Server, what else?! lpallard Slackware 8 09-15-2013 03:14 PM
Mcelog refuses to start on virtualized server Taronyu Linux - Server 2 08-11-2013 01:33 PM
samba refuses to start on startup, but will start manually pepsimachine15 Linux - Software 8 04-20-2009 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration