bitnami@ip-10-99-67-123:~/.rvm/gems$ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] bitnami@ip-10-99-67-123:~/.rvm/gems$ rails -v Rails 3.2.3 bitnami@ip-10-99-67-123:~/.rvm/gems$ mysql --version mysql Ver 14.14 Distrib 5.5.22, for debian-linux-gnu (x86_64) using readline 6.2 bitnami@ip-10-99-67-123:~/.rvm/gems$ mysql -v ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) bitnami@ip-10-99-67-123:~/.rvm/gems$
任何想法为什么发生这种情况?
我只在mysql -v
命令上出错
谢谢。
· --verbose, -v Verbose mode. Produce more output about what the program does. This option can be given multiple times to produce more and more output. (For example, -v -v -v produces table output format even in batch mode.) · --version, -V Display version information and exit.
你想要什么 ? 详细还是版本?
如果你想要服务器端版本,连接到服务器,发送查询status;
你应该用完整的参数连接服务器,例如:
> mysql --user=user --password=password --host=serverip
或者将参数放在~/.my.cnf
就像我的一样:
[mysql] default-character-set=utf8 prompt="\\u@\\h \\r:\\m:\\s > " user=user password=DqvQ86ls1VQit617C host=127.0.0.1 port=3306