connecting to mysql from cygwin

前端 未结 14 1759
时光说笑
时光说笑 2020-12-07 22:08

I can successfully connect to MySQL from a DOS prompt, but when I try to connect from cygwin, it just hangs.

$/cygdrive/c/Program\\ Files/MySQL/MySQL\\ Serve         


        
14条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 22:42

    Disclaimer: The following solved this issue for me under MinTTY on MinGW/MSYS. From research, I believe this same root cause affects Cygwin as well.

    Answer is posted here: https://stackoverflow.com/a/23164362/1034436

    In a nutshell, you'll need to prepend your mysql command with winpty's console.exe (or have aliases that does so). This solution worked with native Windows MySQL executables and not a special cygwin/mingw build. You do, however, have to compile winpty, but that was simple and painless, and worked as per their documentation for me.

    Note: This also solved my issue with several other native Windows console applications, namely Python and Mercurial with OpenSSH.

提交回复
热议问题