我对Cygwin很新,但我一直在使用Windows命令提示符来运行我的MySQL问题并处理外部MySQL查询而没有问题。Cygwin w/MySQL SELECT:未找到命令...正在运行外部.sql文件
我升级到Cgywin,因为它只是一个更好的界面,有更多的选择。
我在这里调用一个外部脚本:E:/dir/test.sql ..我想说明一点,当我在MySQL CLI下以相同的方式运行查询时,test.sql在Windows命令提示符下工作得很完美。 MySQL服务器安装并按预期运行。
$ \. E:/dir/test.sql
-bash: SELECT: command not found
-bash: ,: command not found
-bash: ,: command not found
-bash: ,: command not found
-bash: ,: command not found
-bash: ,: command not found
-bash: ,: command not found
-bash: E:/dir/test.sql: line 9: syntax error near unexpected token `concat'
-bash: E:/dir/test.sql: line 9: `INSERT(concat(b.geo_state, replace("b.mtr", ' ', ''),
'
经过一番研究,我发现,如果我运行:$ mysql的哪个,我得到这样的路径的Linux:在/ usr/bin中/ MySQL和所有我能想到的是我是的mysql.exe在不同的目录可能是所有问题。
但我不知道或找不到如何更改MySQL的默认Cygwin路径(如果这甚至是可能的原因)。