genevish
genevish

Reputation: 111

Can't start MariaDB

I can't start MariaDB after I shut down the server this weekend. I see this in the log:

171030 10:09:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
171030 10:09:18 [Note] /usr/sbin/mysqld (mysqld 5.5.45-MariaDB) starting as process 2583 ...
171030 10:09:18 InnoDB: The InnoDB memory heap is disabled
171030 10:09:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
171030 10:09:18 InnoDB: Compressed tables use zlib 1.2.3
171030 10:09:18 InnoDB: Using Linux native AIO
171030 10:09:18 InnoDB: Initializing buffer pool, size = 128.0M
171030 10:09:18 InnoDB: Completed initialization of buffer pool
171030 10:09:18  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: File name /var/lib/mysql//var/lib/mysql/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
171030 10:09:18 mysqld_safe mysqld from pid file /var/lib/mysql/db05.pid ended

This looks telling:

InnoDB: File name /var/lib/mysql//var/lib/mysql/ibdata1

I'm not sure where it's getting that though. Here's the my.cnf file:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
# innodb_force_recovery = 4
lower_case_table_names = 1
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_data_home_dir = /var/lib/mysql
innodb_data_file_path = /var/lib/mysql/ibdata1:3000M;/var/lib/mysql/ibdata2:586M:autoextend
transaction-isolation=READ-COMMITTED

innodb_log_buffer_size          = 32M
innodb_buffer_pool_size         = 3G
innodb_log_file_size            = 768M

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

I have tried adding the log file entries shown, and increasing the ibdata1 size in the innodb_data_file_path parameter, based on other errors I saw, which I no longer believe were relevant.

Upvotes: 1

Views: 4411

Answers (2)

arielnmz
arielnmz

Reputation: 9115

Apparently, the path /var/lib/mysql is present in your innodb_data_home_dir setting:

innodb_data_home_dir = /var/lib/mysql

But it's also present in innodb_data_file_path. So just change this:

innodb_data_file_path = /var/lib/mysql/ibdata1:3000M;/var/lib/mysql/ibdata2:586M:autoextend

To this:

innodb_data_file_path = ibdata1:3000M;ibdata2:586M:autoextend

Upvotes: 1

O. Jones
O. Jones

Reputation: 108641

Your server is generating a strange pathname to set up the ibdata1 container file. It's doing Path/Path/Filename when it does /var/lib/mysql//var/lib/mysql/ibdata1.

You might try changing this line in my.cnf

innodb_data_file_path = /var/lib/mysql/ibdata1:3000M;/var/lib/mysql/ibdata2:586M:autoextend

to this:

innodb_data_file_path =  ibdata1:3000M;ibdata2:586M:autoextend

If that doesn't work put back the original values. Then do

 px axuww | grep mysql 

to a shell, and try to determine whether your mysqld server program is being run with an extra path variable it doesn't need.

Upvotes: 1

Related Questions