mysql 启动报错--发现系统错误2,系统找不到指定的文件。

渔樵耕读 发布于 2013/08/08 22:02
阅读 47K+
收藏 2
 问下 mysql 服务启动不了 是什么回事?
 管理员权限 cmd : net start  mysql 
   报错: 发现系统错误2,系统找不到指定的文件。
 my.ini 在c:/windows 和mysql 目录下 都有
 以下是my.ini的内容:
[WinMySQLAdmin]
Server=D:/Program Files/mysql/bin/mysqld.exe
[client]
default-character-set = utf8
[mysqld]

default-character-set = utf8
default-collation=utf8_bin
init_connect='SET NAMES utf8'
basedir=D:/Program Files/mysql
datadir=D:/Program Files/mysql/data
[mysql]
default-character-set=utf8
 为什么启动不了呢!! 阿鲁! 
PS: 感觉比oracle 还要烦人呢。。
加载中
0
红薯
红薯
MySQL 5.5 开始 default-character-set 这个配置就不用了,要改名为 character-set-server
红薯
红薯
回复 @渔樵耕读 : 我建议你不妨试试
渔樵耕读
渔樵耕读
回复 @红薯 : 因为我安装的是解压版的? 有没有指定存放目录这一说法? 非得放在 C:/Program Files/MySQL/MySQl Server 5.6下么?
红薯
红薯
回复 @渔樵耕读 : mysql 安装在哪里,my.ini 就在哪里
渔樵耕读
渔樵耕读
启动时候读取的my.ini 到底读的是 mysql/my.ini 还是C:/Windows/my.ini?
1
红薯
红薯
看看 .err 文件里的内容
0
飘逸的逸
飘逸的逸
难道错误信息都没有么?
0
渔樵耕读
渔樵耕读

引用来自“红薯”的答案

看看 .err 文件里的内容
2013-08-08 22:34:19 4908 [Note] Plugin 'FEDERATED' is disabled.
2013-08-08 22:34:19 4908 [Note] InnoDB: The InnoDB memory heap is disabled
2013-08-08 22:34:19 4908 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-08-08 22:34:19 4908 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-08-08 22:34:19 4908 [Note] InnoDB: Not using CPU crc32 instructions
2013-08-08 22:34:19 4908 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-08-08 22:34:19 4908 [Note] InnoDB: Completed initialization of buffer pool
2013-08-08 22:34:19 4908 [Note] InnoDB: Highest supported file format is Barracuda.
2013-08-08 22:34:19 4908 [Note] InnoDB: 128 rollback segment(s) are active.
2013-08-08 22:34:19 4908 [Note] InnoDB: Waiting for purge to start
2013-08-08 22:34:19 4908 [Note] InnoDB: 5.6.13 started; log sequence number 1626027
2013-08-08 22:34:19 4908 [ERROR] C:\Program Files\MySQL\bin\mysqld: unknown variable 'default-character-set=utf8'
2013-08-08 22:34:19 4908 [ERROR] Aborting


2013-08-08 22:34:19 4908 [Note] Binlog end
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'partition'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_METRICS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_CMPMEM'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_CMP'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_LOCKS'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'INNODB_TRX'
2013-08-08 22:34:19 4908 [Note] Shutting down plugin 'InnoDB'
2013-08-08 22:34:19 4908 [Note] InnoDB: FTS optimize thread exiting.
2013-08-08 22:34:19 4908 [Note] InnoDB: Starting shutdown...
2013-08-08 22:34:21 4908 [Note] InnoDB: Shutdown completed; log sequence number 1626037
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'BLACKHOLE'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'ARCHIVE'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'MRG_MYISAM'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'MyISAM'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'MEMORY'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'CSV'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'sha256_password'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'mysql_old_password'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'mysql_native_password'
2013-08-08 22:34:21 4908 [Note] Shutting down plugin 'binlog'
2013-08-08 22:34:21 4908 [Note] C:\Program Files\MySQL\bin\mysqld: Shutdown complete


渔樵耕读
渔樵耕读
@红薯 .err 信息~
0
渔樵耕读
渔樵耕读

我了个擦。。。 根据错误日志 找错实在是快啊!

在修改了注册表后 已经启动了! 谢谢@红薯 大大

红薯
红薯
有最佳答案要设置,没最佳答案有帮助的要顶,养成好习惯哦:)
0
渔樵耕读
渔樵耕读

解压版没有像安装版 那样指定目录,所以需要更改注册表:

HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-services-mysql(服务名)-ImagePath

更改为:"C:\Program Files\MySQL\bin\mysqld" --defaults-file="C:\Program Files\MySQL\my.ini" mysql

q
quchenshiya
谢谢,完美解决了我的困扰
p
pinocchio_2015
大神,找了一上午,原来我也是这样的问题。注册表搞定了我的问题!
h
harryhare
也是这个问题,搜了半天看到这个,赞
龙鸣
龙鸣
要把注册表里的路径改为自己解压缩后Mysqld.exe所在的文件路径。谢了
孙觉
你说的太对了,百度了大半天,大多是千遍一律的抄袭,都看不懂,用了也不行,只有你的最直接,最实用。
0
孙觉
楼上说的太对了,百度了大半天,大多是千遍一律的抄袭,都看不懂,用了也不行,只有楼上的最直接,最实用。
0
秋裤
秋裤
网上一搜 搜到这来了 谢谢分享. 问题解决.
0
轩之临北
很感谢楼主,修改注册变的-ImagePath,把两个地址调制自己的就没问题了。哈哈
返回顶部
顶部