Error installing mariadb

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
linx255
Level 5
Level 5
Posts: 668
Joined: Mon Mar 17, 2014 12:43 am

Error installing mariadb

Post by linx255 »

Hi,

I tried installing mariadb via

Code: Select all

sudo apt-get install mariadb-server
and this is my output ( see the bottom for the errors ):

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient20 libterm-readkey-perl
  mariadb-client-10.0 mariadb-client-core-10.0 mariadb-common mariadb-server-10.0
  mariadb-server-core-10.0 mysql-common
Suggested packages:
  libmldbm-perl libnet-daemon-perl libsql-statement-perl mailx mariadb-test tinyca
Recommended packages:
  libhtml-template-perl
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient20 libterm-readkey-perl
  mariadb-client-10.0 mariadb-client-core-10.0 mariadb-common mariadb-server
  mariadb-server-10.0 mariadb-server-core-10.0 mysql-common
0 upgraded, 12 newly installed, 0 to remove and 41 not upgraded.
Need to get 16.2 MB of archives.
After this operation, 145 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-common all 5.7.19-0ubuntu0.16.04.1 [15.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 mariadb-common all 10.0.31-0ubuntu0.16.04.2 [16.0 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libdbi-perl amd64 1.634-1build1 [743 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmysqlclient20 amd64 5.7.19-0ubuntu0.16.04.1 [809 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libdbd-mysql-perl amd64 4.033-1ubuntu0.1 [84.3 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libterm-readkey-perl amd64 2.33-1build1 [27.2 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 libaio1 amd64 0.3.110-2 [6,356 B]      
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 mariadb-client-core-10.0 amd64 10.0.31-0ubuntu0.16.04.2 [4,375 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 mariadb-client-10.0 amd64 10.0.31-0ubuntu0.16.04.2 [1,178 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 mariadb-server-core-10.0 amd64 10.0.31-0ubuntu0.16.04.2 [4,789 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 mariadb-server-10.0 amd64 10.0.31-0ubuntu0.16.04.2 [4,156 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 mariadb-server all 10.0.31-0ubuntu0.16.04.2 [13.1 kB]
Fetched 16.2 MB in 29s (541 kB/s)                                                               
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 228808 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.7.19-0ubuntu0.16.04.1_all.deb ...
Unpacking mysql-common (5.7.19-0ubuntu0.16.04.1) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../mariadb-common_10.0.31-0ubuntu0.16.04.2_all.deb ...
Unpacking mariadb-common (10.0.31-0ubuntu0.16.04.2) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.634-1build1_amd64.deb ...
Unpacking libdbi-perl (1.634-1build1) ...
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack .../libmysqlclient20_5.7.19-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.19-0ubuntu0.16.04.1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.033-1ubuntu0.1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.33-1build1_amd64.deb ...
Unpacking libterm-readkey-perl (2.33-1build1) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-2) ...
Selecting previously unselected package mariadb-client-core-10.0.
Preparing to unpack .../mariadb-client-core-10.0_10.0.31-0ubuntu0.16.04.2_amd64.deb ...
Unpacking mariadb-client-core-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Selecting previously unselected package mariadb-client-10.0.
Preparing to unpack .../mariadb-client-10.0_10.0.31-0ubuntu0.16.04.2_amd64.deb ...
Unpacking mariadb-client-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Selecting previously unselected package mariadb-server-core-10.0.
Preparing to unpack .../mariadb-server-core-10.0_10.0.31-0ubuntu0.16.04.2_amd64.deb ...
Unpacking mariadb-server-core-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for menu (2.1.47ubuntu1) ...
Setting up mysql-common (5.7.19-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
update-alternatives: warning: not replacing /etc/mysql/my.cnf with a link
Setting up mariadb-common (10.0.31-0ubuntu0.16.04.2) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
update-alternatives: warning: not replacing /etc/mysql/my.cnf with a link
Selecting previously unselected package mariadb-server-10.0.
(Reading database ... 229152 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.0_10.0.31-0ubuntu0.16.04.2_amd64.deb ...
/var/lib/mysql: found previous version 10.0
Unpacking mariadb-server-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../mariadb-server_10.0.31-0ubuntu0.16.04.2_all.deb ...
Unpacking mariadb-server (10.0.31-0ubuntu0.16.04.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libdbi-perl (1.634-1build1) ...
Setting up libmysqlclient20:amd64 (5.7.19-0ubuntu0.16.04.1) ...
Setting up libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Setting up libterm-readkey-perl (2.33-1build1) ...
Setting up libaio1:amd64 (0.3.110-2) ...
Setting up mariadb-client-core-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Setting up mariadb-client-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Setting up mariadb-server-core-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Setting up mariadb-server-10.0 (10.0.31-0ubuntu0.16.04.2) ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2017-08-16 03:19:53 CDT; 6ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 9959 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

Aug 16 03:19:23 device mysqld[10200]: 170816  3:19:23 [ERROR] Unknown/unsupported storage e...oDB
Aug 16 03:19:23 device mysqld[10200]: 170816  3:19:23 [ERROR] Aborting
Aug 16 03:19:23 device mysqld[10200]: 
Aug 16 03:19:23 device mysqld[10200]: 170816  3:19:23 [Note] /usr/sbin/mysqld: Shutdown complete
Aug 16 03:19:23 device mysqld[10200]: 
Aug 16 03:19:53 device mysql[9959]:    ...fail!
Aug 16 03:19:53 device systemd[1]: mysql.service: Control process exited, code=exited status=1
Aug 16 03:19:53 device systemd[1]: Failed to start LSB: Start and stop the mysql database ...mon.
Aug 16 03:19:53 device systemd[1]: mysql.service: Unit entered failed state.
Aug 16 03:19:53 device systemd[1]: mysql.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package mariadb-server-10.0 (--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.0 (>= 10.0.31-0ubuntu0.16.04.2); however:
  Package mariadb-server-10.0 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for menu (2.1.47ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Errors were encountered while processing:
 mariadb-server-10.0
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm not sure where to go from here. I couldn't find any solutions on google / this forum. Please help, thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- I'm running Mint 18 Mate 64-bit
- 4.15.0-34-generic x86_64
- All my bash scripts begin with #!/bin/bash
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Error installing mariadb

Post by xenopeek »

I tried it just now on Linux Mint 18.2 and it installs fine. It installed the exact same package versions and from the same server as in your output. No errors and systemctl status mysql.service shows it as active.

Have you perhaps had mariadb or mysql installed before and left broken configuration files behind? From reading https://serverfault.com/questions/78272 ... ql-service with the same error messages as your logs show, that was the problem there.
Image
User avatar
linx255
Level 5
Level 5
Posts: 668
Joined: Mon Mar 17, 2014 12:43 am

Re: Error installing mariadb

Post by linx255 »

I deleted everything in /etc/mysql to no avail. Same error. If there are configuration files elsewhere that are missing or corrupted I don't know how to find them.

I don't have the .cnf files mentioned here: https://mariadb.com/kb/en/mariadb/mysql ... nd-groups/

Before installing I did:
sudo apt-get remove mysql* mariadb*

If that wiped out any dependencies I don't know which ones I need to re-install. I was expecting a fresh install to recreate anything missing or override anything corrupt.

The serverfault link doesn't give me much to try.

Code: Select all

mkdir /var/run/mysqld/
chown mysql: /var/run/mysqld/
sudo mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --socket=/var/run/mysqld/mysqld.sock
gives me:

Code: Select all

170816 19:29:53 [Note] mysqld (mysqld 10.0.31-MariaDB-0ubuntu0.16.04.2) starting as process 5824 ...
170816 19:29:53 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

170816 19:29:53 [Note] InnoDB: Using mutexes to ref count buffer pool pages
170816 19:29:53 [Note] InnoDB: The InnoDB memory heap is disabled
170816 19:29:53 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
170816 19:29:53 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
170816 19:29:53 [Note] InnoDB: Compressed tables use zlib 1.2.8
170816 19:29:53 [Note] InnoDB: Using Linux native AIO
170816 19:29:53 [Note] InnoDB: Using CPU crc32 instructions
170816 19:29:53 [Note] InnoDB: Initializing buffer pool, size = 128.0M
170816 19:29:53 [Note] InnoDB: Completed initialization of buffer pool
170816 19:29:53 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If you are attempting downgrade from MySQL 5.7.9 or later,
InnoDB: please refer to http://dev.mysql.com/doc/refman/5.6/en/upgrading-downgrading.html
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
170816 19:29:53 [ERROR] Plugin 'InnoDB' init function returned error.
170816 19:29:53 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170816 19:29:53 [Note] Plugin 'FEEDBACK' is disabled.
170816 19:29:53 [ERROR] Unknown/unsupported storage engine: InnoDB
170816 19:29:53 [ERROR] Aborting

170816 19:29:53 [Note] mysqld: Shutdown complete
What configuration files and packages do I need to run the service?
- I'm running Mint 18 Mate 64-bit
- 4.15.0-34-generic x86_64
- All my bash scripts begin with #!/bin/bash
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Error installing mariadb

Post by xenopeek »

"sudo apt-get remove package" does in fact not remove configuration. You should always use "sudo apt-get purge package" so that no configuration files are left behind.

I suggest to remove again whatever you installed for mariadb.

Then remove any residual configuration files. You can do that with this command:
dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge

Next I suggest autoremoving packages that were installed as a dependency but are no longer needed now:
sudo apt-get autoremove --purge

Before you install mariadb again, can you share the output of:
inxi -Sr
so we can see your repositories? Perhaps you added a PPA or other repository that causing some kind of issue with mariadb.
Image
User avatar
linx255
Level 5
Level 5
Posts: 668
Joined: Mon Mar 17, 2014 12:43 am

Re: Error installing mariadb

Post by linx255 »

...should always use "sudo apt-get purge...
dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge
Wow, nice!

So then not even removing with Software Manager purges configuration files? It would be nice to have a checkbox for that or maybe there is one somewhere.

inxi -Sr:
System: Host: mint Kernel: 4.4.0-21-generic x86_64 (64 bit) Desktop: MATE 1.14.1 Distro: Linux Mint 18 Sarah
Repos: Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
deb http://packages.linuxmint.com sarah main upstream import backport
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ xenial partner
I haven't added any repositories. Mariadb now installs without errors using apt-get. However, I didn't see the 'blue screen configuration page' that I used to get when installing.
Last edited by linx255 on Fri Aug 18, 2017 4:23 am, edited 1 time in total.
- I'm running Mint 18 Mate 64-bit
- 4.15.0-34-generic x86_64
- All my bash scripts begin with #!/bin/bash
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Error installing mariadb

Post by xenopeek »

linx255 wrote:So then not even removing with Software Manager purges configuration files? It would be nice to have a checkbox for that or maybe there is one somewhere.
Agreed, though perhaps that goes beyond the scope of Software Manager (I always see it as useful for installing end user applications; I'd install server stuff from the terminal for more detailed information).
linx255 wrote:I haven't added any repositories. Mariadb now installs without errors using apt-get. However, I didn't see the 'blue screen configuration page' that I used to get when installing.
Indeed no problems with your repositories. Hopefully the install going without errors means it will now just work :wink:
Image
User avatar
linx255
Level 5
Level 5
Posts: 668
Joined: Mon Mar 17, 2014 12:43 am

Re: Error installing mariadb

Post by linx255 »

It seems to work, thanks!

I just used to get a blue screen with a gray window (in the terminal) to set passwords and didn't get that this time. It would also come up with 'sudo dpkg-reconfigure ...' but that command does absolutely nothing with this package.

I find this 'end user application vs. server stuff' distinction interesting because I'm an end user who just wants to use this package. Of course, I won't be implementing it in any serious capacity any time soon. I just want database capability for various projects and I don't think I'm even going to host a mariadb server. At most I'll have a MySQL database file on some server that will be accessed by web site. I guess the "server" package is for hosting a server. Maybe that's why I don't get the configuration window; maybe only the "client" package does that.

But I do get the client package with the server package so I guess I'm good. :D

Next thing I gotta do is get Workbench working. I had problems accessing table contents, you might hear from me again soon. :wink:
- I'm running Mint 18 Mate 64-bit
- 4.15.0-34-generic x86_64
- All my bash scripts begin with #!/bin/bash
nelkor
Level 1
Level 1
Posts: 7
Joined: Sun Dec 17, 2017 4:51 am

Re: Error installing mariadb

Post by nelkor »

I had similar problems to linx255 when attempting to install mariadb on Mint 18.3

I followed this thread and now have mariadb installed. The one point which is raised by linx255 but not specifically covered in the thread is the non-appearance of the 'configuration screen' where you used to set the password for mysql/mariadb root user. This caused me some confusion until in desperation I typed :

sudo mysql

and mariadb started up. It would appear that mariadb (and presumably mysql) treat any user with sudo privileges as database root user and so the 'configuration screen' which used to appear during mariadb/mysql install is no longer needed.
User avatar
linx255
Level 5
Level 5
Posts: 668
Joined: Mon Mar 17, 2014 12:43 am

Re: Error installing mariadb

Post by linx255 »

Are you saying one just configures it with commands within mysql/mariadb, as a substitute for the configuration screen? Haven't had time to look around for the answer to that yet and I gotta go. Thanks for the tip!
- I'm running Mint 18 Mate 64-bit
- 4.15.0-34-generic x86_64
- All my bash scripts begin with #!/bin/bash
nelkor
Level 1
Level 1
Posts: 7
Joined: Sun Dec 17, 2017 4:51 am

Re: Error installing mariadb

Post by nelkor »

Possibly. This is how it worked for me.

After i installed mariadb I couldn't start the client. So I couldn't do anything with mariadb.

In sheer desperation and frustration I issued the sudo mysql command, was prompted for my sudo password and was given the mariadb> prompt and was able to create a database, grant access to a new user etc. The user I created has (deliberately) limited privileges and I still have to use sudo mysql to access mariadb as the mysql root user in order to create a new database or new user.

However I have decided to invest in a book about mariadb - I am a bit old school in that I like a decent reference book. Once it arrives I will post here if there is any further update.
User avatar
linx255
Level 5
Level 5
Posts: 668
Joined: Mon Mar 17, 2014 12:43 am

Re: Error installing mariadb

Post by linx255 »

Great, thank you.

Just FYI, a friend recently turned me on to Postgres and MongoDB due to their usefulness with geoaware apps. So I've been debating which I'd like to use. Then I saw this: https://www.youtube.com/watch?v=uLN0PUKu6vU and now I don't know if database/programming is even my thing, so I'm in sort of a quandary, having also asked myself many of the same questions he does. I'm more of a visionary, multi-level, functional design kind of guy but it would be nice to have such high-paying skills if times get tough and the only reason I considered it to begin with was to automate my existing business. But TBH I hate sitting in front of a machine, would rather pay everyone to do machine work for me; been doing this too long. :lol:
- I'm running Mint 18 Mate 64-bit
- 4.15.0-34-generic x86_64
- All my bash scripts begin with #!/bin/bash
nelkor
Level 1
Level 1
Posts: 7
Joined: Sun Dec 17, 2017 4:51 am

Re: Error installing mariadb

Post by nelkor »

Just in case anyone else has the 'apparent' problem of not being able to log into MariaDB as the root user I am posting this. I am very aware that this forum is meant to be about Linux Mint and not about MariaDB so I shall submit this as my final contribution on the topic.

As I posted earlier, if you start mariadb with

Code: Select all

sudo mysql 
and then supply the sudo password when prompted, then you will be logged in to MariaDB as the mysql root user. It appears that on Linux installs of MariaDB the root user no longer has nor needs a password.

MariaDB [none]>

Code: Select all

show grants;
will return

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION

It is the 'VIA unix_socket' part of that which means that no password is needed. The following link takes you to a proper explanation.

https://bugs.launchpad.net/bugs/1447808
minitux

Re: Error installing mariadb

Post by minitux »

if the error is ever this during install
linx255 wrote:dpkg: error processing package mariadb-server-10.0 (--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.0 (>= 10.0.31-0ubuntu0.16.04.2); however:
Package mariadb-server-10.0 is not configured yet.
Errors were encountered while processing:
mariadb-server-10.0
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
try

Code: Select all

sudo rm /var/lib/dpkg/info/mariadb-server-10.0.postinst

Code: Select all

sudo apt-get install -f
User avatar
linx255
Level 5
Level 5
Posts: 668
Joined: Mon Mar 17, 2014 12:43 am

Re: Error installing mariadb

Post by linx255 »

I'll try the commands next time I come back to this problem.
I am very aware that this forum is meant to be about Linux Mint and not about MariaDB so I shall submit this as my final contribution on the topic.
This topic is named "Error installing mariadb" so you are more than welcome to contribute all you like regarding mariadb. There are other sections in the forum for general Linux / Mint talk and you're not off topic here at all.

Thanks
- I'm running Mint 18 Mate 64-bit
- 4.15.0-34-generic x86_64
- All my bash scripts begin with #!/bin/bash
Locked

Return to “Software & Applications”