WIN7 x64html
mysql-5.7.11-winx64 mysql
SQLyog - 64 bitsql
1.安裝,直接解壓mysql-5.7.11-winx64.zip到指定目錄。數據庫
2.配置系統環境變量PATH中配置D:\A_DevTools\mysql-5.7.11-winx64\bin,方便CMD中命令的直接操做。工具
3.配置參數數據庫參數文件,打開D:\A_DevTools\mysql-5.7.11-winx64\bin\my-default.ini。ui
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/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 default-character-set=utf8 character-set-server=utf8 # These are commonly set, remove the # and set as required. basedir = D:\A_DevTools\mysql-5.7.11-winx64 datadir = D:\A_DevTools\mysql-5.7.11-winx64\data port = 3306 # server_id = ..... # 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
根據須要進行參數配置,例如我其中配置了以下 參數
spa
default-character-set=utf8 character-set-server=utf8 basedir = D:\A_DevTools\mysql-5.7.11-winx64 datadir = D:\A_DevTools\mysql-5.7.11-winx64\data port = 3306
4.CMD中運行以下命令:code
1) 根據datadir=D:\A_DevTools\mysql-5.7.11-winx64\data在data目錄中初始化註冊服務安裝須要的數據信息,完成後可看到data下多了一些文件;-insecure表示默認root帳戶無密碼。server
mysqld --initialize-insecurehtm
2) 註冊服務安裝,完成後可在系統services中看到啓動項,命令中參數--defaults-file=可省略
mysqld install MySQL --defaults-file="D:\A_DevTools\mysql-5.7.11-winx64\my-default.ini"
3) 啓動服務,至關於在services中啓動同樣
net start MySQL
4) 移除服務,該命令用於從services中移除啓動服務
mysqld remove MySQL
效果圖以下:
若是操做有誤,致使服務沒法啓動,請先刪除data目錄(以便mysqld --initialize-insecure能正確初始化),按步驟從新操做嘗試。
5.使用客戶端工具進行鏈接操做,鏈接成功後記得修改空密碼。