Percona pt-online-schema-change 无法更改 table

Percona pt-online-schema-change failing to alter table

我正在尝试使用 pt-online-schema-change 更改 table 中的数据大小。我正在尝试将 name 列增加到 varchar(30)

pt-online-schema-change D=clients,t=client_types --alter "CHANGE `name` `name` varchar(30)" --dry-run;

我遇到了一些错误。

-bash: name: command not found

然后看起来命令执行但最终失败了。

Operation, tries, wait:
analyze_table, 10, 1
copy_rows, 10, 0.25
create_triggers, 10, 1
drop_triggers, 10, 1
swap_tables, 10, 1
update_foreign_keys, 10, 1
Starting a dry run.  `clients`.`client_types` will not be altered.  Specify --execute instead of --dry-run to alter the table.
Creating new table...
Created new table clients._client_types_new OK.
Altering new table...
2019-10-08T13:43:40 Dropping new table...
2019-10-08T13:43:40 Dropped new table OK.
Dry run complete.  `clients`.`client_types` was not altered.
Error altering new table `clients`.`_client_types_new`: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(30)' at line 1 [for Statement "ALTER TABLE `clients`.`_client_types_new` CHANGE   varchar(30)"] at /usr/bin/pt-online-schema-change line 9194.

我正在使用 mysql Ver 14.14

这解决了我的问题。 pt-online-schema-change --dry-run --alter "modify name varchar(30)" D=client,t=client_types;