MySQLコマンドラインクライアントでタブ補完が機能しません。

MySQLコマンドラインクライアントでタブ補完が機能しません。

Homebrewを使用してMacにMySQL 5.7.10をインストールしました。私のMacではOSX 10.11.3を実行しています。

MySQLコマンドラインクライアントを実行すると、キーワード、テーブル名、または列名にタブ補完機能は使用できません。

タブを完了するにはどうすればよいですか?

joenyland@Joes-MBP ~ $ mysql --auto-rehash
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.7.10 Homebrew

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

これは次の出力ですotool

joenyland@Joes-MBP ~ $ otool -L /usr/local/bin/mysql
/usr/local/bin/mysql:
    /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
    /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

ベストアンサー1

テーブルと列のタブ補完は、そのテーブルを含むデータベースに接続されている場合、またはそのデータベースを使用している場合にのみ機能します。サーバーを実行しmysqlて接続すると、コマンドライン(またはcnfファイル)で接続するデータベースを指定しない限り、mysqlシステムテーブルのみが表示されます。use mydatabase;すべてのテーブルmydatabaseに対してタブの完成を許可するには、実行するだけです。または、コマンドラインから直接データベースに接続する

mysql mydatabase

おすすめ記事