User Tools

Site Tools


mysql

**This is an old revision of the document!**

Import di un grande file .sql in mysql:

pv --progress --size 24157429063 sprar_prod0_20190801.sql | sed -e "s|^INSERT INTO |INSERT IGNORE INTO |g" | mysql -usprardb -psprardb -h192.168.216.177 -P 3306 sprardb

pv mostra il progresso di trasferimento in una pipe

sed sostituisce gli insert con insert ignore into per riprendere l'import in caso sia stato annullato

mysql -uusername -ppassword -hhost -P port number [nome_database]

mysql.1574850517.txt.gz · Last modified: 2019/11/27 11:28 by valerio