mysql——启动服务问题Found option without preceding group in config file

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xcymorningsun/article/details/80306997

一、问题描述


最近笔记本电脑带出去办公了一趟,回来就发现navicat连接不上mysql了(myslq解压版安装的),一脸懵逼,都不知道啥原因,一头雾水。

  • navicat中显示错误是:
2003 can't connect to MySQL server on '127.0.0.1'(10038).

  • 实际问题是:

数据库mysql服务没有启动起来,一直在启动一直不成功。

  • 当我把尝试启动的mysql服务进程关闭以后,手动启动mysql net start mysql的时候报了下面的错误:
error: Found option without preceding group in config file: D:\mysql-5.6.24-win32\my.ini at line: 1  
Fatal error in defaults handling. Program aborted  

然后慌了,因为卸载也卸载不了,纠结要不要重新装,不过里面还有好多数据啊==



二、解决方法


后来查找资料找到了原因,因为mysql里面的配置文件my.ini文件格式是utf-8。

只要把my.ini文件格式改为ANSI就可以了。


然后net start mysql,完美运行。



猜你喜欢

转载自blog.csdn.net/xcymorningsun/article/details/80306997