Maria DB does not start. Work for mariadb.service failed. See "System Status mariadb.service" and "journalctl -xn" for details.

I am trying to install maria db and get the following problem.

[ root@localhost ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details. 

I tried 'systemctl status mariadb.service' and 'journalctl -xn' and follows the details.

 [ root@localhost ~]# systemctl status mariadb.service mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) Active: failed (Result: exit-code) since Sun 2014-09-21 17:19:44 IST; 23s ago Process: 2712 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE) Process: 2711 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS) Process: 2683 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) Main PID: 2711 (code=exited, status=0/SUCCESS) Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'. Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Sep 21 17:19:43 localhost.localdomain mysqld_safe[2711]: 140921 17:19:43 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdoma...d ended Sep 21 17:19:44 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1 Sep 21 17:19:44 localhost.localdomain systemd[1]: Failed to start MariaDB database server. Sep 21 17:19:44 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state. [ root@localhost ~]# journalctl -xn -- Logs begin at Sun 2014-09-21 02:33:29 IST, end at Sun 2014-09-21 17:20:11 IST. -- Sep 21 17:16:26 localhost.localdomain 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. Sep 21 17:18:11 localhost.localdomain NetworkManager[683]: <warn> nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted Sep 21 17:19:42 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/listinfo/systemd-devel -- -- Unit mariadb.service has begun starting up. Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'. Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Sep 21 17:19:43 localhost.localdomain mysqld_safe[2711]: 140921 17:19:43 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid end Sep 21 17:19:44 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1 Sep 21 17:19:44 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/listinfo/systemd-devel -- -- Unit mariadb.service has failed. -- -- The result is failed. Sep 21 17:19:44 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state. Sep 21 17:20:11 localhost.localdomain NetworkManager[683]: <warn> nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted 

Can anyone help?

I tried to uninstall and install many times, but got the same error.

Thanks in advance.

+6
source share
3 answers

I decided the following:

After installation

 Run: > mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/ Then: > mysql_secure_installation And then: systemctl start mariadb 

with this, I can decide.

0
source

In most cases, if the system log ( journalctl ) does not show what the problem is, the MariaDB error log (located in /var/lib/mysql/localhost.localdomain.err ) /var/lib/mysql/localhost.localdomain.err . Looking at this file, you usually see what the problem is.

Most often, errors that do not disappear after reinstallation mean that your data directory (default /var/lib/mysql/ ) is corrupted and you need to reinstall the database using mysql_install_db . To make sure you are doing a clean installation, delete all the files located in the data directory, and then run sudo mysql_install_db --user=mysql .

0
source

Puppet configuration in VM

Error

Work for puppetserver.service failed. See "Statusctl status puppetserver.service" and "journalctl -xn" for details.

Decision

Increase memory size

-3
source

Source: https://habr.com/ru/post/1203077/


All Articles