On Wed, Mar 12, 2008 at 3:26 PM, Tim McDaniel <[EMAIL PROTECTED]> wrote: > On Wed, 12 Mar 2008, Michael Dykman <[EMAIL PROTECTED]> wrote: > > > It's quite simple; -p, --password takes an optional argument which > > it will only look for if > > a) the short form is immediately followed by a non-space char > > I thought I'd made it clear above that I understand the rule. I am > complaining (in a forum where no maintainer is likely to be present, > unfortunately) that it was a bad design that made -p be parsed > differently from -u and likely all the other switches. A wise > consistency is useful, because users have to remember fewer rules.
It's not unheard of for those who maintain the code and information to subscribe to the general lists as well. I'm a PHP/docs maintainer and am very active on the PHP-General list, for example. The same applies for several others, and several other projects (I'm also on with Mozilla, Mandriva, KDE, etc.). My guess - and keep in mind, it's *strictly* a guess - is that -p differs from -u and the like in case your password begins with a space, which is valid for MySQL passwords. If you still wanted to pass a space-starting password from the command line, you can pass -p' 123' as the flag, but then you can't have single quotes. You will also need to escape some special characters passed in from the command line as a password this way. Exclamation points (!), question marks(?), hashmarks (#), adz/amphora (@), and some others will work, but if you have parentheses, quotes, backticks, or some other characters, they won't. An off-the-wall guess could be that everyone expects to have a space between the parameter value. If you have a flag that requires no data between itself and the value, it does break the pattern - which then forces someone who may not want to read the manual, man mysql, or check out the --help data prior to jumping in head-first to discover that there are two ways of performing the action. And with that forced lesson, hopefully they'll learn that the prompt is the safer way of doing this. Again, though, that's the off-the-wall possibility. A "Learn or Die" ultimatum. -- </Dan> Daniel P. Brown Senior Unix Geek <? while(1) { $me = $mind--; sleep(86400); } ?> -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]