Add possibility for pt-online-schema-change to read DSN from the configuration file

Bug #1448207 reported by Sveta Smirnova
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to

Bug Description

Not everybody wants to share credentials information such as user names and passwords on command line. For most of tools in Percona Toolkit users can specify such credentials in the configuration file and pass it with option --config. But this is not true for pt-online-schema-change:

 cat >issue53309.cnf
pt-online-schema-change --config=./issue53309.cnf
Unknown option: config
Usage: pt-online-schema-change [OPTIONS] DSN

Errors in command-line arguments:
  * Error parsing options
  * A DSN must be specified
  * The DSN must specify a database (D) and a table (t)

pt-online-schema-change alters a table's structure without blocking reads or
writes. Specify the database and table in the DSN. Do not use this tool before
reading its documentation and checking your backups carefully. For more
details, please use the --help option, or try 'perldoc
/home/sveta/Downloads/percona-toolkit-2.2.13/bin/pt-online-schema-change' for
complete documentation.

As workaround users can pass credentials using --defaults-file, but this way they have to specify rest of arguments on command line. Also this workaround would not work for hosts, different from localhost, due to bug #1314696

Tags: i53309
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

$pt-online-schema-change --version
pt-online-schema-change 2.2.13

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Agustín (agustin-gallego) wrote :

Hi Sveta,

Note that

"Also, you cannot specify --config=/path/to/file; you must specify the option and the path to the file separated by whitespace without an equal sign between them"


Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.