pt-online-schema-change can't connect with comma in password
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Frank Cizmich |
Bug Description
Seems that in some step of the DSN building for the DBI connect method the password get cut when it contains a comma.
For example, with password "fizz,buzz", with this command:
pt-online-
It return this:
Cannot connect to MySQL: DBI connect(
And in debug output we can see:
# DSNParser:2210 29539 DBI:mysql:
# DSNParser:2259 29539 DBI:mysql:
# DSNParser:2259 29539 DBI:mysql:
Cannot connect to MySQL: DBI connect(
This is happening with percona toolkit 2.2.6.
Changed in percona-toolkit: | |
status: | Invalid → New |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Fernando, can you try the following instead:
pt-online- schema- change --alter "<SOME BASIC ALTER>" --host "<DB HOST>" --user "root" --password "fizz\,buzz" --alter- foreign- keys-method "auto" D=test,t=test
See the "\" before the comma. It worked on my test.
root@node2: /home/vagrant# pt-online- schema- change --user test_user --password "comma\,separated" --alter "ENGINE=InnoDB" D=test,t=t --dry-run foreign_ keys, 10, 1
Operation, tries, wait:
copy_rows, 10, 0.25
create_triggers, 10, 1
drop_triggers, 10, 1
swap_tables, 10, 1
update_
Starting a dry run. `test`.`t` will not be altered. Specify --execute instead of --dry-run to alter the table.
Creating new table...
Created new table test._t_new OK.
Altering new table...
Altered `test`.`_t_new` OK.
Not creating triggers because this is a dry run.
Not copying rows because this is a dry run.
Not swapping tables because this is a dry run.
Not dropping old table because this is a dry run.
Not dropping triggers because this is a dry run.
2014-02-12T09:27:27 Dropping new table...
2014-02-12T09:27:27 Dropped new table OK.
Dry run complete. `test`.`t` was not altered.