Sublime Text MySQL Build System variable substitution issue

我与影子孤独终老i 提交于 2019-12-07 21:48:43

问题


I'm trying to configure Sublime text to do MySQL build, following is the script:

{
    "cmd": ["mysql", "--default-character-set=utf8", "-uuser", "-ppwd", "-hlocalhost", "-v", "db_mine", "-e source main.sql"],
    "selector": "source.sql"
}

As it is, it works for file main.sql, as presented in the script. Obviously that should be changed, I see people using $file there.

The problem is that here (Windows 7) it's not working.

If I change it to $file, then I get:

ERROR at line 1: Unknown command '\U'.

Any suggestion?


回答1:


The following works on macOS:

{
    "cmd": ["/usr/local/mysql/bin/mysql", "-u", "root", "-e", "source $file", "-t"],
    "selector": "source.sql"
}


来源:https://stackoverflow.com/questions/40594295/sublime-text-mysql-build-system-variable-substitution-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!