Databases Reference
In-Depth Information
Here, we've specified the username saleh and the password tomcat .
If specified in a configuration file, the leading dashes should be omitted. For example,
you would write --user=saleh on the command line and user=saleh in an options file.
We'll generally omit the leading dashes in our descriptions.
Many options also have a short form that can be used only from the command line.
For example, instead of writing --user=saleh on the command line, you can write the
short form -u saleh . To help you understand what each command does, we consis-
tently use the long form of each option (where one exists).
Most of the command-line utilities we describe in this topic have a help option that
you can use to discover the command syntax, including any short forms. For example,
to learn about the options to use for the mysql program, type:
$ mysql --help
mysql Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (i686) using readline 5.0
Copyright (C) 2002 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
...
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-u, --user=name User for login if not current user.
...
We've shown only part of the output here. You can see that you can use the short form
-? instead of --help , -u in place of --user= , and -p in place of --password= . The brackets
indicate that a clause is optional; for example, you can call the mysql program without
any command-line options or database name.
Some options assume default values if you don't specify anything. To avoid surprises,
you can always explicitly specify the values you want.
When a command gets too long for the page, we show it on multiple lines, with each
line ending with a backslash ( \ ) symbol. For example, we might show the previous
command as:
$ mysql \
--user=saleh \
--password=tomcat
The backslash characters indicate that this is a single command that should be typed
in all on one line. You can actually type in the backslash on a Linux or Mac OS X system
to continue your command on a new line, but it's not necessary.
 
Search WWH ::




Custom Search