MariaDB installation error

installationmariadb

I am trying to install MariaDB as below

sudo apt install mariadb-server

Reading package lists... Done
Building dependency tree
Reading state information... Done
mariadb-server is already the newest version (10.1.20+maria-1~xenial).
The following package was automatically installed and is no longer required:
  libevent-core-2.0-5
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up mariadb-server-10.1 (10.1.20+maria-1~xenial) ...

enter image description here

enter image description here

enter image description here

2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Using Linux native AIO
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Using SSE crc32 instructions
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Completed initialization of buffer pool
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Highest supported file format is Barracuda.
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: The log sequence numbers 1607324 and 1607324 in ibdata files do not match the log sequence number 1607334 in the ib_logfiles!
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Database was not shutdown normally!
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Starting crash recovery.
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Restoring possible half-written data pages
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: from the doublewrite buffer...
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: 128 rollback segment(s) are active.
2016-12-23 16:02:33 140016351164672 [Note] InnoDB: Waiting for purge to start
2016-12-23 16:02:33 140016351164672 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.34-79.1 started; log sequence number 1607334
2016-12-23 16:02:33 140015623444224 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-12-23 16:02:33 140016351164672 [Note] Plugin 'FEEDBACK' is disabled.
2016-12-23 16:02:33 140016351164672 [Note] Recovering after a crash using tc.log
2016-12-23 16:02:33 140016351164672 [Note] Starting crash recovery...
2016-12-23 16:02:33 140016351164672 [Note] Crash recovery finished.
ERROR: 1054  Unknown column 'password' in 'field list'
2016-12-23 16:02:33 140016351164672 [ERROR] Aborting

Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mariadb-server-10.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.1 (= 10.1.20+maria-1~xenial); however:
  Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mariadb-server-10.1
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

So what was the problem and how to fix this ?

Best Answer

The error you see is the result of errors during earlier attempts to upgrade mariadb. Possibly you mistyped the rootpassword there as well, and the upgrade process was not done properly.

Part of the upgrade is running mysql_upgrade to update system tables to the schema expected by the new version. The error 1054 you see indicates that this has not been done after the most recent upgrade.

This in turn causes mariadb to fail to start and causes the package to remain unconfigured. So fix the root cause first: run mysql_upgrade.

Unfortunately, this command requires that mariadb is up and running, so you now have a chicken and egg problem. I believe that you can kill the chicken with mysqld's --skip-grant-tables option, but am not 100% sure of that.

Related Topic