I have earlier MySQL 5.7 over Ubuntu 16.04 with following configuration in /etc/mysql/my.cnf.

innodb_buffer_pool_size = 1228M
innodb_log_file_size = 512M
innodb_log_buffer_size = 16M
innodb_read_io_threads = 64
innodb_write_io_threads = 64
query_cache_size = 10M
max_allowed_packet = 16M
key_buffer_size = 1M

I have upgraded it to MariaDB 10.3 and it worked but then I got high memory usage warnings over Ubuntu and database keeps dropping connection. I noticed that /etc/mysql/my.cnf was overwritten with default settings provided along with installation and I was getting error as below:

InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
21:23:59 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.3.13-MariaDB-1:10.3.13+maria~xenial-log
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 316620K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x49000
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

That error was fixed but I am wondering in which file should I change parameters so that it won't be overwritten?


It is a good practice to place all your custom configuration in /etc/my.cnf.d/ directory. For example, you need to store galera configs, MariaDB configs, so you need to create:

  • /etc/my.cnf.d/galera.cnf
  • /etc/my.cnf.d/mariadb.cnf

Make sure you use the right option group for your variables in each file. Option groups are explained here: https://mariadb.com/kb/en/library/configuring-mariadb-with-option-files/

By the way, if you will specify variables in /etc/my.cnf.d./server.cnf your configuration will be overwritten after the server upgrade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.