执行我运行在命令行下面的查询中Raspbian时输出帮助/选项:的MySQL命令行
mysql -u $NAME -p $PASS Tweets -e "SELECT count(*) FROM raw_tweets;"
而且它输出以下。我确定这是一个设置的地方,但我所有的搜索都没有结果。先谢谢您的帮助。
MySQL的版本14.14 DISTRIB 43年5月5日,对于使用的readline 6.2 版权(C)2000,2015,Oracle和/或其附属公司Debian的Linux-GNU(armv7l)。版权所有。
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并从那里运行它们时,它们的查询确实执行 – ktrip