This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-16. For the latest, interactive version please visit https://mariadb.com/kb/.

mariadb 10.1.12 mysql_install_db aborts on unkown file 'test'

using Docker container with -v /data:/var/lib/mysql
xtrabackup-v2 (2.4) 999:docker /data
chown mysql:mysql /var/lib/mysql

Initializing

2016-03-11 13:59:18 139887411787712 [Note] /usr/sbin/mysqld (mysqld 10.1.12-MariaDB-1~jessie) starting as process 54 ...
2016-03-11 13:59:18 139887411787712 [Note] WSREP: Read nil XID from storage engines, skipping position init
2016-03-11 13:59:18 139887411787712 [Note] WSREP: wsrep_load(): loading provider library 'none'
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: The InnoDB memory heap is disabled
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Memory barrier is not used
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Using Linux native AIO
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Using SSE crc32 instructions
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Initializing buffer pool, size = 400.0M
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Completed initialization of buffer pool
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2016-03-11 13:59:18 139887411787712 [Note] InnoDB: Database physically writes the file full: wait...
2016-03-11 13:59:19 139887411787712 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2016-03-11 13:59:25 139887411787712 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2016-03-11 13:59:27 139887411787712 [Warning] InnoDB: New log files created, LSN=45883
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: Doublewrite buffer created
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: 128 rollback segment(s) are active.
2016-03-11 13:59:27 139887411787712 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: Foreign key constraint system tables created
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: Tablespace and datafile system tables created.
2016-03-11 13:59:27 139887411787712 [Note] InnoDB: Waiting for purge to start
2016-03-11 13:59:27 139887411787712 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 0
2016-03-11 13:59:27 139886535374592 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-03-11 13:59:27 139887411550976 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
2016-03-11 13:59:31 139640839899072 [Note] /usr/sbin/mysqld (mysqld 10.1.12-MariaDB-1~jessie) starting as process 83 ...
2016-03-11 13:59:31 139640839899072 [Note] WSREP: Read nil XID from storage engines, skipping position init
2016-03-11 13:59:31 139640839899072 [Note] WSREP: wsrep_load(): loading provider library 'none'
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: The InnoDB memory heap is disabled
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Memory barrier is not used
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Using Linux native AIO
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Using SSE crc32 instructions
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Initializing buffer pool, size = 400.0M
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Completed initialization of buffer pool
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Highest supported file format is Barracuda.
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: 128 rollback segment(s) are active.
2016-03-11 13:59:31 139640839899072 [Note] InnoDB: Waiting for purge to start
2016-03-11 13:59:31 139640839899072 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616799
2016-03-11 13:59:31 139639968990976 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-03-11 13:59:34 140650620151744 [Note] /usr/sbin/mysqld (mysqld 10.1.12-MariaDB-1~jessie) starting as process 113 ...
2016-03-11 13:59:34 140650620151744 [Note] WSREP: Read nil XID from storage engines, skipping position init
2016-03-11 13:59:34 140650620151744 [Note] WSREP: wsrep_load(): loading provider library 'none'
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: The InnoDB memory heap is disabled
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Memory barrier is not used
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Using Linux native AIO
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Using SSE crc32 instructions
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Initializing buffer pool, size = 400.0M
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Completed initialization of buffer pool
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Highest supported file format is Barracuda.
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: 128 rollback segment(s) are active.
2016-03-11 13:59:35 140650620151744 [Note] InnoDB: Waiting for purge to start
2016-03-11 13:59:35 140650620151744 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616809
2016-03-11 13:59:35 140649751873280 [Note] InnoDB: Dumping buffer pool(s) not yet started
ERROR: 1049  Unknown database 'test'
2016-03-11 13:59:35 140650620151744 [ERROR] Aborting


my.cnf

mysqld]
#
# * Basic Settings
#
skip-host-cache
skip-name-resolve
bind-address   			= 0.0.0.0
port					= 3306
# basedir					= /usr
datadir					= /var/lib/mysql
tmpdir					= /tmp
socket					=/var/run/mysqld/mysqld.sock
user					= mysql
lc_messages_dir			= /usr/share/mysql
lc_messages				= en_US
skip-external-locking
#
#  * Fine Tuning
#
max_connections			= 100
connect_timeout			= 5
wait_timeout			= 600
max_allowed_packet		= 16M
thread_cache_size   	= 128
sort_buffer_size		= 4M
bulk_insert_buffer_size	= 16M
tmp_table_size			= 32M
max_heap_table_size		= 32M
#
# * MyISAM
#
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched. On error, make copy and try a repair.
myisam_recover_options 	= BACKUP
key_buffer_size			= 128M
#open-files-limit		= 2000
table_open_cache		= 400
myisam_sort_buffer_size	= 512M
concurrent_insert		= 2
read_buffer_size		= 2M
read_rnd_buffer_size	= 1M

# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# we do want to know about network errors and such
log-error	=/dev/stderr
log_warnings		= 3
#
# Enable the slow query log to see queries with especially long duration
#slow_query_log[={0|1}]
slow_query_log_file		= /var/log/mysql/mariadb-slow.log
long_query_time 		= 10
expire_logs_days		= 10
max_binlog_size     	= 100M

# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
default_storage_engine	= InnoDB
innodb_log_file_size	= 48M
innodb_log_buffer_size	= 8M
innodb_file_per_table	= 1
innodb_buffer_pool_size	= 400M
innodb_open_files		= 400
innodb_io_capacity		= 400
innodb_flush_method		= O_DIRECT
innodb-doublewrite		=1

innodb-autoinc-lock-mode=2
innodb-flush-log-at-trx-commit=0
innodb_data_file_path	=ibdata1:12M:autoextend

log-bin					=ON
binlog-format			=ROW
wsrep-provider			=/usr/lib/galera/libgalera_smm.so
wsrep-sst-method		=xtrabackup-v2
wsrep_on				=ON 
query-cache-size=0
query_cache_type=0
read_buffer_size=1G
# following to be changed by docker-entrypoint.sh before mysql_install_db
wsrep-node-address=
wsrep-node-name=
wsrep-cluster-name=
wsrep-cluster-address=
wsrep-sst-auth=
wsrep-sst-donor=

# xtrabackup Configuration
[sst]
progress=1
compressor="gzip"
decompressor="gzip -dc"
rebuild=ON
compact=ON
encrypt	=0


mysql_install_db --user=mysql --datadir="$DATADIR" --rpm

Answer Answered by Ian Gilfillan in this comment.

I suggest reporting as a bug.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.