Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Bash mysql blank

Tags:

mysql

git-bash

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:

enter image description here

like image 963
Phil Cross Avatar asked Sep 17 '15 00:09

Phil Cross


1 Answers

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).

like image 81
piotrgajow Avatar answered Sep 26 '22 03:09

piotrgajow