It is working for me like this
Set the path in command line to mysqlbin i.e (in which directory mysql is installed)
For eg: (I had tried this one in localhost)
C:AppServMySqlbin>
then enter a command mysql -u root -h localhost -p and “Press Enter” then it will ask for a password, then enter your password and “Press Enter” Then you got a message like this “Welcome to mysql moniter…………… ” like this
For testing type a command “Show databases;” without double Quotes now you can see the databases