Saturday, November 24, 2018

Import 2G sql file to mysql database

edit my.cnf
my.cnf
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

[mysqld]
innodb_buffer_pool_size=2048M (50% of your ram)
max_connections=100
key_buffer_size=256M
max_allowed_packet=256M

innodb_buffer_pool_size = 2G
innodb_log_buffer_size = 256M
innodb_log_file_size = 1G
innodb_write_io_threads = 16
innodb_flush_log_at_trx_commit = 0
then
mysql -uroot -p dbname < /var/www/mydb.sql


source: https://dba.stackexchange.com/a/83385/86553

No comments:

Post a Comment