国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

幫助中心 >  技術(shù)知識(shí)庫(kù) >  數(shù)據(jù)庫(kù) >  相關(guān)技術(shù)支持 >  Windows下安裝MySQL 5.7.17壓縮版后無(wú)法啟動(dòng),錯(cuò)誤1067:進(jìn)程意外終止

Windows下安裝MySQL 5.7.17壓縮版后無(wú)法啟動(dòng),錯(cuò)誤1067:進(jìn)程意外終止

2017-01-21 17:29:06 9433

Windows下安裝MySQL 5.7.17壓縮版后無(wú)法啟動(dòng),錯(cuò)誤1067:進(jìn)程意外終止


首先下載最新的MySQL 5.7.17 Community 壓縮版 for Windows 64-bit:

官方下載地址:http://www.tjdsmy.cn/downloads/mysql/

2.1.png


然后解壓到安裝目錄(如C:ProgMySQL)。接下來(lái)復(fù)制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


之后用“管理員身份”打開(kāi)cmd,進(jìn)入安裝目錄安裝MySQL服務(wù):


C:ProgMySQLin>mysqld install

Service successfully installed.

然后啟動(dòng)MySQL服務(wù):


net start mysql

剛開(kāi)始以為就這么簡(jiǎn)單,可是卻報(bào)錯(cuò)了:

2.2.png

如果是通過(guò)Windows系統(tǒng)的“服務(wù)”啟動(dòng),則提示:

2.3.png


查了許久,原來(lái)是:

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”.


具體可參考這兩個(gè)鏈接:

http://www.tjdsmy.cn/doc/refman/5.7/en/windows-initialize-data-directory.html

http://www.tjdsmy.cn/doc/refman/5.7/en/data-directory-initialization-mysqld.html


原因找到了,那我們來(lái)手動(dòng)Initialize Data Directory一下?。?/p>

mysqld --defaults-file=C:ProgMySQLmy.ini --initialize-insecure

2.4.png


然后依次:

net start mysql

mysql -u root -p

應(yīng)該就出來(lái)了。

希望對(duì)遇到的人有所幫助,究其原因就是5.7.7及?后的壓縮包版本,更改為需要手動(dòng)Initialize Data Directory了。



提交成功!非常感謝您的反饋,我們會(huì)繼續(xù)努力做到更好!

這條文檔是否有幫助解決問(wèn)題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問(wèn)題: