mac安装双系统win10后 安装mysql5.7.17服务一直启动不起来,然后日志说 InnoDB: File .\ib_logfile101: 'aio write' returned

根据官方的提示:

Make a fresh installation of mysql when it hang "in service start..."
make this:
open with notepad++ the file my.ini file and to innodb section add this:
#*** INNODB Specific options ***
innodb_buffer_pool_size        = 256M
innodb_log_file_size           = 256M
innodb_thread_concurrency      = 16
innodb_flush_log_at_trx_commit = 2
innodb_flush_method            = normal

Save the file, after 
go a usually on windows
c:\ProgramData\MySQL\MySQL Server5.5\data and cancel this file:
DESKTOP-K1N1S7A.err
ib_logfile0
ib_logfile1
ibdata1

Now you can resume the installation ad yoy see the service start.
Note, If the installation not continue... no problem, close ed remake the installation.

我们在 C:\ProgramData\MySQL\MySQL Server 5.7\下找到 my.ini

用notpad++打开,或者其他专业工具,不要用记事本打开,会破坏配置文件格式,官方也说了用notpad++

ctrl+f 输入#*** INNODB Specific options ***

在下面添加一下几列,注意格式

innodb_buffer_pool_size        = 256M
innodb_log_file_size           = 256M
innodb_thread_concurrency      = 16
innodb_flush_log_at_trx_commit = 2
innodb_flush_method            = normal

然后保存

此时可以将数据库安装界面关掉 了,然后window+r输入:services.msc 打开服务,找到mysql 点击启动

不出意外,报错

我们看看日志,发现很多类似报错Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

这个我猜测是数据库没有初始化,导致无法加载 启动mysql服务必须使用的表

这里应该有个命令 可以直接初始化,但是我忘记了,就用了个笨方法,去我女朋友电脑,找到 C:\ProgramData\MySQL\MySQL Server 5.7\Data 这个目录下,把mysql这个文件夹复制到自己电脑的目录下面,然后在从服务启动,哎,好了

这个 mysql的我已经共享了 链接:https://pan.baidu.com/s/1-w79AISEarQnnMlcSrgapA 
提取码:fab6

被人的文章是参考的,还是要靠自己去解决问题。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章