如何使用 MySQL 制表符补全? auto-rehash 行已在我的 my.cnf 文件中。补全适用于 select 命令,但不适用于 source 命令。
最佳答案
您只能使用制表符完成 SQL 标识符,而不能使用文件系统路径。如 --auto-rehash
下所述(强调):
This option is on by default, which enables database, table, and column name completion.
您可能更愿意使用流重定向将 SQL 源文件定向到 mysql
命令行工具的标准输入:
$ mysql -u myuser -p mydb < /path/to/myfile.sql
关于MySQL 自动补全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16425546/