1

I've just installed the mariadb package and doesn't work (doesn't start), I've these outputs:

systemctl status -l mariadb.service

● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

journalctl | grep mariadb | tail

 action org.freedesktop.systemd1.manage-units for system-bus-name::1.110 [systemctl start mariadb.service] (owned by unix-user:velzm)
 dic 04 08:17:21 nmveliz systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
 dic 04 08:17:21 nmveliz systemd[1]: mariadb.service: Unit entered failed state.
 dic 04 08:17:21 nmveliz systemd[1]: mariadb.service: Failed with result 'exit-code'.

systemctl status mariadb.service

● mariadb.service - MariaDB database server
  Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; ven
  Active: failed (Result: exit-code) since Sat 2016-12-03 16:44:12 CST; 
  Process: 1959 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUST
  Process: 1906 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ]
  Process: 1903 ExecStartPre=/bin/sh -c systemctl unset-environment _WSRE
  Main PID: 1959 (code=exited, status=1/FAILURE)

dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396413908  
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816  
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816  
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816  
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816  
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816  
dic 03 16:44:12 nmveliz systemd[1]: mariadb.service: Main process ex  
dic 03 16:44:12 nmveliz systemd[1]: Failed to start MariaDB database  
dic 03 16:44:12 nmveliz systemd[1]: mariadb.service: Unit entered fa  
dic 03 16:44:12 nmveliz systemd[1]: mariadb.service: Failed with res  
lines 1-18/18 (END)

journalctl -xe

dic 03 16:56:30 nmveliz mysqld[2707]: 2016-12-03 16:56:30 1401676738
dic 03 16:56:30 nmveliz mysqld[2707]: 2016-12-03 16:56:30 1401676738
dic 03 16:56:30 nmveliz mysqld[2707]: 2016-12-03 16:56:30 1401676738
dic 03 16:56:31 nmveliz mysqld[2707]: 2016-12-03 16:56:31 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401670818
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676737
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz systemd[1]: mariadb.service: Main process ex
dic 03 16:56:33 nmveliz systemd[1]: Failed to start MariaDB database
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mariadb.service has failed.
-- 
-- The result is failed.
dic 03 16:56:33 nmveliz systemd[1]: mariadb.service: Unit entered fa
dic 03 16:56:33 nmveliz systemd[1]: mariadb.service: Failed with res
dic 03 16:56:33 nmveliz sudo[2649]: pam_unix(sudo:session): session 
  • use status -l to get the full width output, and journalctl|tail similarly. – meuh Dec 4 '16 at 10:29
1

I had the same problem on my Antergos install.

It seams mariadb doesn't install properly and cant access its directories

I fixed my problem doing...

sudo mysql_install_db --user=mysql --basedir=/usr/ --ldata=/var/lib/mysql/

unable to launch mysqld in arch linux

But there is another solution, changing the ownership of /var/lib/mysql to mysql user and group

sudo chown mysql:mysql -R /var/lib/mysql

https://stackoverflow.com/questions/31813552/linux-antergos-install-mysql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.