下載安裝包MySQL Installer下載地址1:http://dev./downloads/windows/installer/ 說明:官網(wǎng)當(dāng)前版本 5.6.22,;雖然只有32位的安裝包,,但是根據(jù)官網(wǎng)的描述說明,,安裝包應(yīng)該同時(shí)支持windows32位和windows64位系統(tǒng),; Note: MySQL Installer is 32 bit, but will install both 32 bit and 64 bit binaries 下載地址2:http://pan.baidu.com/s/1eQvPSfo 說明:我使用的是免安裝的mysql-5.6.20-winx64壓縮包,以下配置步驟以這個(gè)壓縮包為準(zhǔn)。你可以前往我的百度網(wǎng)盤下載,; 安裝和配置mysql-5.6.20-winx64step1. 解壓目錄將下載好的壓縮包解壓到D:\mysql-5.6.20-winx64下,; step2. 配置my.ini文件復(fù)制一份目錄下的my-default.ini文件重命名my.ini,配置如下: basedir=D:/mysql-5.6.20-winx64 //安裝目錄 datadir=D:/mysql-5.6.20-winx64/data //數(shù)據(jù)庫存放目錄 配置代碼:
# For advice on how to change settings please see # http://dev./doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... basedir=D:/mysql-5.6.20-winx64 datadir=D:/mysql-5.6.20-winx64/data character-set-server=utf8 #character-set-connection=utf8 #character-set-results=utf8 # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysql] [client]
step3. 配置環(huán)境變量將將D:\mysql-5.6.20-winx64\bin加入path中,以分號(hào)結(jié)束。 step4. 輸出日志到控制臺(tái)在控制臺(tái)命令窗口進(jìn)入D:\mysql-5.6.20-winx64\bin目錄,,輸入命令mysql --console
step5. 注冊(cè)mysql為windows service輸入命令:D:\mysql-5.6.20-winx64\bin>mysqld install 成功提示:Service successfully installed. step6. 啟動(dòng)服務(wù)運(yùn)行services.msc進(jìn)入服務(wù)列表,,手動(dòng)啟動(dòng)剛安裝好的MySQL服務(wù);
step7. 使用root用戶登陸mysqlroot用戶默認(rèn)密碼為空,,直接回車即可,;下面是登陸成功界面: step8. 修改root用戶登陸密碼輸入命令:grant all on *.* to 'root'@'localhost' identified by '123456'; 成功提示:Query OK, 0 rows affected (0.00 sec)
在此要感謝“企業(yè)寶”寫的博客帶我入門,博主博客:http://www.cnblogs.com/qiyebao/p/3887055.html,。
|
|