- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
Windows下安装MySQL 5.7.17压缩版后无法启动,错误1067:进程意外终止
首先下载最新的MySQL 5.7.17 Community 压缩版 for Windows 64-bit:
官方下载地址:http://www.landui.com/downloads/mysql/
然后解压到安装目录(如C:ProgMySQL)。接下来复制my-default.ini为my.ini,修改my.ini如下:
[mysql]
default-character-set=utf8mb4
[mysqld]
basedir = C:ProgMySQL
datadir = C:ProgMySQLdata
port = 3306
max_connections=200
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
default-storage-engine=INNODB
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
之后用“管理员身份”打开cmd,进入安装目录安装MySQL服务:
C:ProgMySQLin>mysqld install
Service successfully installed.
然后启动MySQL服务:
net start mysql
刚开始以为就这么简单,可是却报错了:
如果是通过Windows系统的“服务”启动,则提示:
查了许久,原来是:
If you installed MySQL using the Noinstall package, you may need to initialize the data directory:
1.Windows distributions prior to MySQL 5.7.7 include a data directory with a set of preinitialized accounts in the mysql database.
2.As of 5.7.7, Windows installation operations performed using the Noinstall package do not include a data directory. To initialize the data directory, use the instructions at Section 2.10.1.1, “Initializing the Data Directory Manually Using mysqld”.
具体可参考这两个链接:
http://www.landui.com/doc/refman/5.7/en/windows-initialize-data-directory.html
http://www.landui.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
原因找到了,那我们来手动Initialize Data Directory一下啊:
mysqld --defaults-file=C:ProgMySQLmy.ini --initialize-insecure
然后依次:
net start mysql
mysql -u root -p
应该就出来了。
希望对遇到的人有所帮助,究其原因就是5.7.7及?后的压缩包版本,更改为需要手动Initialize Data Directory了。
售前咨询
售后咨询
备案咨询
二维码
TOP