【发布时间】:2015-12-09 03:46:45
【问题描述】:
我在 Raspbian 的命令行中运行以下查询:
mysql -u $NAME -p $PASS Tweets -e "SELECT count(*) FROM raw_tweets;"
它正在输出以下内容。我确定这是某个地方的设置,但我所有的搜索都没有结果。提前感谢您的帮助。
mysql Ver 14.14 Distrib 5.5.43,适用于使用 readline 6.2 的 debian-linux-gnu (armv7l) 版权所有 (c) 2000, 2015,Oracle 和/或其附属公司。保留所有权利。
Oracle 是 Oracle Corporation 和/或其 附属公司。其他名称可能是其各自的商标 所有者。
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion, but startup
and reconnecting may take a longer time. Disable with
--disable-auto-rehash.
(Defaults to on; use --skip-auto-rehash to disable.)
-A, --no-auto-rehash
No automatic rehashing. One has to use 'rehash' to get
table and field completion. This gives a quicker start of
mysql and disables rehashing on reconnect.
--auto-vertical-output
Automatically switch to vertical output mode if the
result is wider than the terminal width.
-B, --batch Don't use history file. Disable interactive behavior.
(Enables --silent.)
--character-sets-dir=name
Directory for character set files.
--column-type-info Display column type information.
-c, --comments Preserve comments. Send comments to the server. The
default is --skip-comments (discard comments), enable
with --comments.
-C, --compress Use compression in server/client protocol.
-#, --debug[=#] This is a non-debug version. Catch this and exit.
--debug-check Check memory and open file usage at exit.
-T, --debug-info Print some debug info at exit.
....... (Abbreviated, above should give enough of an example)
【问题讨论】:
-
这些变量
$NAME和$PASS是否在这里定义?你用的是linux还是windows? -
您的查询是否会执行?
-
实际的用户名和密码在里面,只是省略了,这里似乎没有执行查询。但是,当我启动 MySQL 并从那里运行它时,它们会执行查询
标签: mysql