增加栏位:
pt-online-schema-change --user=root --password=a099e0 --alter "ADD COLUMN IS_MOBILE INT(1)" --socket=/data/db/mysql3398/mysql3398.sock D='fay',t='FC_PAY_FRMER' --no-check-replication-filters --alter-foreign-keys-method=auto --recursion-method=none --print --execute --no-version-check
相关报错及解决
# pt-online-schema-change --user=root --password=a099e01 --alter "ADD COLUMN IS_MILE INT(1)" --socket=/data/db/mysql3398/mysql3398.sock D='fay',t='FC_PAY_FM_CUSTOMER' --no-check-replication-filters --alter-foreign-keys-method=auto --recursion-method=none --print --execute
DBD::mysql::db selectrow_arrayref failed: Table 'performance_schema.session_variables' doesn't exist [for Statement "SHOW VARIABLES LIKE 'wsrep_on'"] at /bin/pt-online-schema-change line 8074.
解决办法:
# /usr/local/mysql/bin/mysql_upgrade -uroot -p --socket=/data/db/mysql3398/mysql3398.sock
相关报错及解决
# pt-online-schema-change --user=root --password=a099 --alter "ADD COLUMN IS_MLE INT(1)" --socket=/data/db/mysql3398/mysql3398.sock D='fay',t='FC_PAY_F_CUSTOMER' --no-check-replication-filters --alter-foreign-keys-method=auto --recursion-method=none --print --execute
DBD::mysql::db selectrow_arrayref failed: fetch() without execute() [for Statement "SHOW VARIABLES LIKE 'wsrep_on'"] at /bin/pt-online-schema-change line 8074.
解决办法:重启MySQL后问题解决