[arch-general] MariaDB not starting
Hello, I've got problems with MariaDB not working. 1) "systemctl status mariadb.service": ● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2017-01-27 13:04:10 CET; 13s ago Process: 4574 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE) Process: 4519 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR Process: 4517 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Main PID: 4574 (code=exited, status=1/FAILURE) Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Starting crash recovery... Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Crash recovery finished. Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454332160 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Server socket created on IP: '::'. Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE Jan 27 13:04:10 tuchola systemd[1]: Failed to start MariaDB database server. Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Unit entered failed state. Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Failed with result 'exit-code'. 2) "journalctl -xe": -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mariadb.service has begun starting up. Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 4574 ... Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Using mutexes to ref count buffer pool pages Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: The InnoDB memory heap is disabled Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Compressed tables use zlib 1.2.11 Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Using Linux native AIO Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Using SSE crc32 instructions Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Initializing buffer pool, size = 128.0M Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Completed initialization of buffer pool Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Highest supported file format is Barracuda. Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600749 in the Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Database was not shutdown normally! Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Starting crash recovery. Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Reading tablespace information from the .ibd files... Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Restoring possible half-written data pages Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: from the doublewrite buffer... Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: 128 rollback segment(s) are active. Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Waiting for purge to start Jan 27 13:04:09 tuchola mysqld[4574]: 2017-01-27 13:04:09 140214454369792 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.34-79.1 started; log sequence number 1600749 Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Plugin 'FEEDBACK' is disabled. Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140213863028480 [Note] InnoDB: Dumping buffer pool(s) not yet started Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Recovering after a crash using mysql-bin Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Starting crash recovery... Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Crash recovery finished. Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454332160 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Server socket created on IP: '::'. Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE Jan 27 13:04:10 tuchola 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. Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Unit entered failed state. Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Failed with result 'exit-code'. Jan 27 13:04:10 tuchola sudo[4514]: pam_unix(sudo:session): session closed for user root Sorry, but those messages are not very expressive to me. I also tried to re-install mariadb, removing /var/lib/mysql (no important data had been in there until now ...) It seems to me, database data hadn't been re-created, but how can I get mariadb working now? BTW, is there a possibility to do a clean-up after package uninstall? Kind regards Peter
Hello,
1) "systemctl status mariadb.service": (...) Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist (...)
I'm not ssure about what you tried, but your installation seems incomplete. Did you run the mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql before starting it? Did you follow the installation instructions there https://wiki.archlinux.org/index.php/MySQL ? If not, you should start there maybe :) Kind regards, -- Ismael
On 27 January 2017 at 12:12, Peter Nabbefeld <peter.nabbefeld@gmx.de> wrote:
I've got problems with MariaDB not working.
I think you might want to read the "Installation" section on the Wiki: https://wiki.archlinux.org/index.php/MySQL#Installation In particular, I think you forgot to run mysql_install_db. Cheers, Paul
Am 27.01.2017 um 13:18 schrieb Paul Gideon Dann via arch-general:
On 27 January 2017 at 12:12, Peter Nabbefeld <peter.nabbefeld@gmx.de> wrote:
I've got problems with MariaDB not working.
I think you might want to read the "Installation" section on the Wiki:
https://wiki.archlinux.org/index.php/MySQL#Installation
In particular, I think you forgot to run mysql_install_db.
Cheers, Paul
Hi Paul, Thank You - the problem is, that some installation details are missing in the German wiki, or just at the wrong place: I've found what I've been missing in the installation as a hint for possible problem solution, not as a necessary install step ... Kind regards Peter
I got the tables built and mariadb.service started but running mysql_secure_installation and hitting enter where it asks for the password I get error 1045 and there is no root password set for mysql on this installation yet. On Fri, 27 Jan 2017, Peter Nabbefeld wrote:
Date: Fri, 27 Jan 2017 08:07:45 From: Peter Nabbefeld <peter.nabbefeld@gmx.de> Reply-To: General Discussion about Arch Linux <arch-general@archlinux.org> To: arch-general@archlinux.org Subject: Re: [arch-general] MariaDB not starting
Am 27.01.2017 um 13:18 schrieb Paul Gideon Dann via arch-general:
On 27 January 2017 at 12:12, Peter Nabbefeld <peter.nabbefeld@gmx.de> wrote:
I've got problems with MariaDB not working.
I think you might want to read the "Installation" section on the Wiki:
https://wiki.archlinux.org/index.php/MySQL#Installation
In particular, I think you forgot to run mysql_install_db.
Cheers, Paul
Hi Paul,
Thank You - the problem is, that some installation details are missing in the German wiki, or just at the wrong place: I've found what I've been missing in the installation as a hint for possible problem solution, not as a necessary install step ...
Kind regards Peter
--
Was this start attempt just after mariadb install where the archwiki page got used or a start attempt after successful setup? If the former, I had the same bad luck and went with postgresql and got postgresql up and running. On Fri, 27 Jan 2017, Peter Nabbefeld wrote:
Date: Fri, 27 Jan 2017 07:12:20 From: Peter Nabbefeld <peter.nabbefeld@gmx.de> Reply-To: General Discussion about Arch Linux <arch-general@archlinux.org> To: arch-general@archlinux.org Subject: [arch-general] MariaDB not starting
Hello,
I've got problems with MariaDB not working.
1) "systemctl status mariadb.service":
? mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2017-01-27 13:04:10 CET; 13s ago Process: 4574 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE) Process: 4519 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR Process: 4517 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Main PID: 4574 (code=exited, status=1/FAILURE)
Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Starting crash recovery... Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Crash recovery finished. Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454332160 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [Note] Server socket created on IP: '::'. Jan 27 13:04:10 tuchola mysqld[4574]: 2017-01-27 13:04:10 140214454369792 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE Jan 27 13:04:10 tuchola systemd[1]: Failed to start MariaDB database server. Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Unit entered failed state. Jan 27 13:04:10 tuchola systemd[1]: mariadb.service: Failed with result 'exit-code'.
2) "journalctl -xe":
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
participants (4)
-
Ismael Bouya
-
Jude DaShiell
-
Paul Gideon Dann
-
Peter Nabbefeld