[root@MYSQL-DB17 ~]# pt-online-schema-change --charset=utf8 --user=root --password=xinhehui --host=10.50.28.227 --port=3310 --alter "ADD COLUMN xl_amount_9 decimal(20,0) NULL DEFAULT 0 COMMENT '鑫利宝账户' " D=habby,t=a --exec
Cannot connect to A=utf8,D=habby,P=3311,h=,p=...,u=root
No slaves found. See --recursion-method if host MYSQL-DB17 has slaves.
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
Operation, tries, wait:
copy_rows, 10, 0.25
create_triggers, 10, 1
drop_triggers, 10, 1
swap_tables, 10, 1
update_foreign_keys, 10, 1
Altering `habby`.`a`...
Creating new table...
Created new table habby._a_new OK.
Altering new table...
Altered `habby`.`_a_new` OK.
2017-01-19T14:34:16 Creating triggers...
2017-01-19T14:34:16 Created triggers OK.
2017-01-19T14:34:16 Copying approximately 1 rows...
2017-01-19T14:34:16 Copied rows OK.
2017-01-19T14:34:16 Swapping tables...
2017-01-19T14:34:16 Swapped original and new tables OK.
2017-01-19T14:34:16 Dropping old table...
2017-01-19T14:34:16 Dropped old table `habby`.`_a_old` OK.
2017-01-19T14:34:16 Dropping triggers...
2017-01-19T14:34:16 Dropped triggers OK.
Successfully altered `habby`.`a`.
Cannot connect to A=utf8,D=habby,P=3311,h=,p=...,u=root
No slaves found. See --recursion-method if host MYSQL-DB17 has slaves.
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
不影响执行结果,尽管大胆的执行,也没有办法禁止掉这个报警
pt-online-schema-change --user=root --defaults-file=/home/mysql/my3310.cnf --charset=utf8 --alter "ADD COLUMN xl_amount decimal(20,0) NULL DEFAULT 0 COMMENT '鑫利宝账户' " D=habby,t=a --exec
pt-online-schema-change --user=root --socket=/home/mysql/my3310/run/mysql.sock --charset=utf8 --alter "ADD COLUMN xl_amount_2 decimal(20,0) NULL DEFAULT 0 COMMENT '鑫利宝账户' " D=habby,t=a --exec
pt-online-schema-change --user=root --socket=/home/mysql/my3310/run/mysql.sock --charset=utf8 --alter "ADD COLUMN xl_amount_3 decimal(20,0) NULL DEFAULT 0 COMMENT '鑫利宝账户' " D=habby,t=a --exec
pt-online-schema-change --user=root --socket=/home/mysql/my3310/run/mysql.sock --charset=utf8 --alter "ADD COLUMN xl_amount_4 decimal(20,0) NULL DEFAULT 0 COMMENT '鑫利宝账户' " D=habby,t=a --exec
pt-online-schema-change --user=root --socket=/home/mysql/my3310/run/mysql.sock --charset=utf8 --alter "ADD COLUMN xl_amount_5 decimal(20,0) NULL DEFAULT 0 COMMENT '鑫利宝账户' " D=habby,t=a --exec
pt-online-schema-change --charset=utf8 --user=root --password=xinhehui -h 10.50.28.227 -P 3310 --alter "ADD COLUMN xl_amount_8 decimal(20,0) NULL DEFAULT 0 COMMENT '鑫利宝账户' " D=habby,t=a --exec
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29291882/viewspace-2132687/,如需转载,请注明出处,否则将追究法律责任。