MySQL5.0不能启动服务及无法找到配置的解决方法今天启动Mysql时,无法启动服务,也有很长一
2015-09-18 17:37
756 查看
MySQL5.0不能启动服务及无法找到配置的解决方法
今天启动Mysql时,无法启动服务,也有很长一段时间没开了,估计是前一段时间改了一下注册表和服务之后就出现了点问题。
首先登录之后的错误提示是这样的:
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
上网上查了一下错误代码,2003 就是mysql服务没有启动,请启动该服务。
于是到控制面板下找mysql服务,并未找到...
又于是乎,“开始”--“运行”--“cmd”,输入mysqld --install(本步骤用于安装mysql服务)
启动mysql服务后,立即登录,又出现错误如下:
could not find settings
Either the server service or the configuration file could not be found. Startup variables and service section are therefore disabled
于是进我的mysql的安装目录下查看my.ini,内容应该正常,反正自己就是没更改过。文件也存在。
进注册表,“开始”--“运行”--“regedit”,找到
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MySQL\ImagePath
把原来的内容:
"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" MySQL
改成如下:
"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\MY.INI" MySQL
改好后,再次登录,一切正常!
今天启动Mysql时,无法启动服务,也有很长一段时间没开了,估计是前一段时间改了一下注册表和服务之后就出现了点问题。
首先登录之后的错误提示是这样的:
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
上网上查了一下错误代码,2003 就是mysql服务没有启动,请启动该服务。
于是到控制面板下找mysql服务,并未找到...
又于是乎,“开始”--“运行”--“cmd”,输入mysqld --install(本步骤用于安装mysql服务)
启动mysql服务后,立即登录,又出现错误如下:
could not find settings
Either the server service or the configuration file could not be found. Startup variables and service section are therefore disabled
于是进我的mysql的安装目录下查看my.ini,内容应该正常,反正自己就是没更改过。文件也存在。
进注册表,“开始”--“运行”--“regedit”,找到
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MySQL\ImagePath
把原来的内容:
"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" MySQL
改成如下:
"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\MY.INI" MySQL
改好后,再次登录,一切正常!
相关文章推荐
- mysql报错:could not find settings Either the server service or the configuration file could not be fou
- mysql慢查询日志开启
- 深入浅出Mysql(四)
- 细数十大你不得不用的MySQL开发工具(1)
- mysql控制台操作
- mysql报错Access denied for user ''@'localhost'”
- MySQL 5.6 for Windows 解压缩版配置安装
- Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- MySQL问题,设置为不允许为空的字段却可以为空
- mysql 子查询优化
- Mysql中类似于nvl()函数的ifnull()函数
- MYSQL查询优化:profile功能
- MySQL(14):Select-limit(限制获得的记录数量)
- [MySQL] MySQL存储过程与存储函数
- mysqldump参数选项
- MySQL(13):Select-order by
- MySQL Join算法与调优白皮书(三)
- 终于知道为什么我的mysql总是卸载的不干净以及老是找不到my.ini文件
- MySQL连接数据库:C API代码, Linux,Windows
- mysql Multi_Range_Read 优化