0

I am trying to shutdown the mysql server from command line.

MySQL root password is "" (blank)

C:\Users\Jigar>"C:\mysql\bin\mysqladmin.exe" -u root -p shutdown
Enter password:

When I just press enter, it stops the server.

But when I don't specify -p, I am not able to stop the server:

C:\Users\Jigar>"C:\mysql\bin\mysqladmin.exe" -u root shutdown
C:\mysql\bin\mysqladmin.exe: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

I am actually writing a program to stop the server. In mac I was able to stop the server with blank root password without specifying -p in the command. But I am not able to do the same in Windows.

3
  • Try using --password to set a blank one (I'm not sure if that will work).
    – Vatev
    Nov 14, 2013 at 12:56
  • 1
    Having a blank root password is not ideal from a security standpoint.
    – ModulusJoe
    Nov 14, 2013 at 13:04
  • @Vatev, same result as -p. @Acyclic Tau, Agree. But some people leave it blank on development machine.
    – Jigar
    Nov 15, 2013 at 7:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.