MySQL大表改结构(pt-online-schema-change)

yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm

yum install percona-toolkit

https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html

pt-online-schema-change –user=xxx –password=”xxx” –host=”xxx” –alter=”ADD bbb INT NULL DEFAULT ‘0’” D=dmp_main,t=test –execute