user/mariadb: server setup fails
Bugzilla ID | 342 |
Reporter | Hal G |
Assignee | A. Wilcox (awilfox) |
Reported | 2020-08-08 08:22:32 -0500 |
Modified | 2020-09-22 22:48:21 -0500 |
Status | IN_PROGRESS |
Version | 1.0-RC1 |
Hardware | Adélie Linux / Intel x86 (64-bit) |
Importance | --- / major |
Package(s) | mariadb-server |
Description
OVERVIEW
mariadb dbms must be initialized prior to performing any further steps, such as creating databases. This is done by running "/etc/init.d/mariadb setup"
SAMPLE OUTPUT
/etc/init.d/mariadb setup
- /run/mariadb: correcting mode
- Creating a new MySQL database in /var/lib/mariadb ...Installing MariaDB/MySQL system tables in '/var/lib/mariadb' ...
2020-08-08 5:33:18 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2020-08-08 5:33:18 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-08-08 5:33:19 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-08-08 5:33:19 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-08-08 5:33:19 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-08-08 5:33:19 0 [ERROR] Aborting
cat: write error: Broken pipe
cat: write error: Broken pipe
cat: write error: Broken pipe
Installation of system tables failed! Examine the logs in
/var/lib/mariadb for more information.
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
shell> /usr/sbin/mysqld --skip-grant-tables --general-log &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables;
Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /var/lib/mariadb that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss
Please check all of the above before submitting a bug report
at http://mariadb.org/jira
[ !! ]
BACKGROUND
This problem was discovered when trying to launch bareos-director (if mysql/mariadb is chosen as the bareos dbms):
service bareos-director start
- Data directory '/var/lib/mariadb' is empty or invalid.
- Run '/etc/init.d/mariadb setup' to create new database.
- ERROR: mariadb failed to start
- Starting Bareos Director daemon ... [ ok ]
ADDITIONAL INFO
This is a known issue; see e.g.: https://jira.mariadb.org/browse/MDEV-16015
This problem apparently appeared somewhere in mariadb 10.2.x - 10.3.x per the link. Although that report was for docker environments, it turns out this has been a problem outside of those as well.
For comparison, I set up a mariadb install on devuan beowulf, which is at version 10.3.23 and the mariadb server runs without issues. Since my example is running inside a VirtualBox VM, I can confirm this bug is not virtualization-specific (though this was suspect originally; see link for more).
This could be related to musl.