这个时候多半是ini文件出了问题。
1.去检查你的my.ini的保存编码格式是不是ANSI,如果不是将其改为ANSI
(一般我们修改my.ini时,都无法直接保存,而是选择另存为在其他目录下,再去替换,在另存为的时候默认的编码可能会变为UTF-8)
大家还要注意检查文件的后缀名,有一次我发现自己建立的ini文件,后缀名实际上是txt。



2.到服务里面查看MySQL的服务状态,如果之前启动失败的话,这里其状态可能会是“启动”(表示它在启动过程中,一般会卡在这里,启动不了),并不是“已启动”。

这时要到任务管理器中,去结束一个叫做mysqld.exe的进程,结束之后mysql的进程就会自动停止。


3.重新启动mysq服务,可以通过“服务”-右键启动,也可以通过cmd(注意管理员模式)命令net start mysql启动。