Created
November 21, 2024 17:05
-
-
Save mattantonelli/eccb8e888740f8605ec397b578d9fc20 to your computer and use it in GitHub Desktop.
Configure MariaDB to improve dump restore time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/my.cnf.d/mariadb-server.cnf | |
[mysqld] | |
innodb_buffer_pool_size = 4G # 50% RAM | |
innodb_log_file_size = 1G | |
innodb_flush_log_at_trx_commit = 0 | |
innodb_doublewrite = 0 | |
max_allowed_packet = 256M | |
# Load the dump, skipping uniqueness and foreign key checks | |
time mysql -u root -p -D my_database --init-command="SET SESSION FOREIGN_KEY_CHECKS=0; SET SESSION UNIQUE_CHECKS=0;" < dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment