Re: [percona-group] Percona tool pt-online-chema-change problem ....

628 views
Skip to first unread message

Ovais Tariq

unread,
Nov 16, 2012, 6:00:00 AM11/16/12
to percona-d...@googlegroups.com
The command line used is wrong, it should be as follows:

pt-online-schema-change --user=root --ask-pass --alter "ADD column ip VARCHAR(32)" --dry-run D=ye,t=ye2,h=localhost 

where "ye" I suppose is the name of the database and "ye2" is the name of the table that has to be altered.

Best,


On Fri, Nov 16, 2012 at 12:31 PM, mySQLgirl <yeri...@gmail.com> wrote:
HELP
What's wrong with my command ?
it will not work , why?
I have tried all kinds alternative but this should work !!!
thx
Yvonne

[root@itdtstdb01 ~]# pt-online-schema-change --user=root --ask-pass --alter "ADD column ip VARCHAR(32)"  D=ye t=ye2  h=localhost   --dry-run
Usage: pt-online-schema-change [OPTIONS] DSN

Errors in command-line arguments:
  * Specify only one DSN on the command line
  * The DSN must specify a database (D) and a table (t)

--
You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
To post to this group, send email to percona-d...@googlegroups.com.
 
 



--

Ovais Tariq, Principal Support Engineer, Percona Inc.

http://www.percona.com | http://www.mysqlperformanceblog.com
Phone               : +1 (888) 401-3401 Ext. 552
Mobile               : +92 3212949959 (PKT)
24/7 Emergency : +1 888 401 3401 ext 911
Skype               : ovaistariq

Training : http://www.percona.com/training/
Support  : http://www.percona.com/mysql-support/

Percona Live MySQL Conference: New York 2012
http://www.percona.com/live/nyc-2012/

Ewen Fortune

unread,
Nov 16, 2012, 9:02:02 AM11/16/12
to percona-d...@googlegroups.com
Yvonne,

On Fri, Nov 16, 2012 at 12:00 PM, Ovais Tariq <ovais...@percona.com> wrote:
> The command line used is wrong, it should be as follows:
>
> pt-online-schema-change --user=root --ask-pass --alter "ADD column ip
> VARCHAR(32)" --dry-run D=ye,t=ye2,h=localhost

As a side note, it looks like you are going to store an IP address as
VARCHAR(32)
If this is the case, you may wish to store as a 4 byte INT and convert
from and to dotted quad using the inet_aton and inet_ntoa

http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html#function_inet-aton
http://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html#function_inet-ntoa


Ewen

Justin Swanhart

unread,
Nov 16, 2012, 10:37:42 AM11/16/12
to percona-d...@googlegroups.com, percona-d...@googlegroups.com
Hi, 
A DSN must have no spaces and items in the DSN are comma separated.  


Try this:
"D=ye,t=ye2"

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages