Git Bash MySQL空白 [英] Git Bash mysql blank
问题描述
我已经从www.git-scm.com安装了Git(bash?) 我还可以正常安装MySQL.我正在使用Windows 8.1.我的mysql bin目录的路径在我的路径环境变量中,并且mysql服务正在运行.
如果我打开cmd.exe并输入mysql -u root
,则它成功登录我,我收到欢迎使用mysql监视器"消息,然后就可以开始输入sql.
但是在Git bash中,如果我键入mysql -u root
,它将仅启动一个新的空白链接,并且不执行任何操作.
如果我键入mysql -?
,那么我仍然会获得mysql帮助信息.如果我键入mysql start
,我会得到Access denied for user ''@'localhost' to database 'start'
.
如何在git bash中正确访问mysql?
请在下面查看我的原始图片以解释我的情况:
我在git bash和mysql上遇到了相同的问题,对此的解决方法是使用
winpty mysql -u root
我想这是因为您正在使用unix环境在Windows上运行mysql,并且据我所知winpty应该用于在git bash中运行Windows应用程序(不是100%肯定,也许有人可以确认). /p>
I've installed Git (bash?) from www.git-scm.com I also have a working installation of MySQL. I'm using windows 8.1. The path to my mysql bin directory IS in my path environment variable, and the mysql service IS running.
If i open cmd.exe and type in mysql -u root
then it logs me in successfully, I get the "welcome to mysql monitor" message, and i can start typing sql away.
However in Git bash, if I type in mysql -u root
then it just starts a new blank link and doesn't do anything.
If i type in mysql -?
then i still get the mysql help information. If i type in mysql start
, I get the Access denied for user ''@'localhost' to database 'start'
.
How can I access mysql properly in git bash?
Please see my crude image explaining my situation below:
I had the same problem with git bash and mysql, and solution to this is to use
winpty mysql -u root
I guess this is because you are running mysql for windows, using unix environment, and as far as I know winpty should be used for running windows applications in the git bash (not 100% sure, maybe someone can confirm).
这篇关于Git Bash MySQL空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!