improve speed of mysql import

前端 未结 9 1548
無奈伤痛
無奈伤痛 2021-01-31 14:26

I have large database of 22GB. I used to take backup with mysqldump command in a gzip format.

When i extract the gz file it produces the

9条回答
  •  闹比i
    闹比i (楼主)
    2021-01-31 15:02

    Make sure you increase your "max_allowed_packet" variable to a large enough size. This will really help if you have a lot of text data. Using high performance hardware will surely improve the speed of importing data.

    mysql --max_allowed_packet=256M -u root -p < "database-file.sql"
    

提交回复
热议问题