我试图在命令行上使用–defaults-file选项登录
mysql:
$mysql --defaults-file ~/mycnf.cnf
但是我收到以下错误:
mysql: unknown option '--defaults-file'
但是这个选项列在帮助中:
$mysql --help
...
Default options are read from the following files in the given order:
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-file=# Only read default options from the given file #.
这里发生了什么?这是mysql –version的输出
$mysql --version
mysql Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1