connecting to mysql from cygwin

前端 未结 14 1712
时光说笑
时光说笑 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:59

    Found this question today 2018-03-18 looking for some answers to

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql.sock' (2 "No such file or directory")
    

    The file /etc/my.conf references config files in /etc/my.cnf.d I added this to /etc/my.cnf.d/client.cnf:

    [client]
    host=127.0.0.1
    protocol=tcp
    

    After that I was able to access the local windows MySQL instance from a cygwin terminal using mysql -u root -p

提交回复
热议问题