Option Defaults, Options Expecting Values, and the = Sign
By convention, long forms of options that assign a value are written with an equals (=) sign, like this:
shell mysql --host=tonfisk --user=jon
For options that require a value (that is, not having a default value), the equals sign is not required, and
so the following is also valid:
shell mysql --host tonfisk --user jon
In both cases, the mysql client attempts to connect to a MySQL server running on the host named
“tonfisk” using an account with the user name “jon”.
Due to this behavior, problems can occasionally arise when no value is provided for an option that
expects one. Consider the following example, where a user connects to a MySQL server running on
host tonfisk as user jon:
shell mysql --host 85.224.35.45 --user jon
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.14 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql SELECT CURRENT_USER();
+----------------+
| CURRENT_USER() |
... zobacz całą notatkę
Komentarze użytkowników (0)