在Windows 7上从命令行停止MySQL服务器

时间:2013-11-14 12:48:58

标签: mysql command-line command-prompt

我试图从命令行关闭mysql服务器。

MySQL root密码为“”(空白)

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

当我按Enter键时,它会停止服务器。

但是当我没有指定-p时,我无法停止服务器:

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

我实际上正在编写一个程序来停止服务器。在mac中,我能够使用空白root密码停止服务器,而无需在命令中指定-p。但是我无法在Windows中执行相同的操作。

0 个答案:

没有答案