MySql 5.7.17免安裝配置教程詳解
1、下載mysql-5.7.17-winx64.zip安裝包(鏈接:https://dev.mysql.com/downloads/mysql/)
2、解壓安裝包。
D:\DevelopTool\mysql-5.7.17-winx64 #解壓目錄
3、在解壓目錄下創(chuàng)建一個(gè)名為data的文件夾,用來(lái)存放數(shù)據(jù)
D:\DevelopTool\mysql-5.7.17-winx64\data
4、配置啟動(dòng)文件
把 D:\DevelopTool\mysql-5.7.17-winx64\my-default.ini 文件copy一份,重新命名為 my.ini ,修改里面的參數(shù),如下:
# 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 # These are commonly set, remove the # and set as required. # basedir = ..... # datadir = ..... # port = ..... # server_id = ..... ######################### # basedir 為安裝文件解壓后的目錄 | basedir和datadir 可以使用相對(duì)路徑 # basedir=./.. basedir=D:\\DevelopTool\\mysql-5.7.11-winx64 # datadir 為用來(lái)存放數(shù)據(jù)的目錄 # datadir=./../data datadir=D:\\DevelopTool\\mysql-5.7.11-winx64\\data # port 為端口號(hào) port=3306 # mar_connections為最大連接數(shù) max_connections=20 character_set_server=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 explicit_defaults_for_timestamp=true sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
5、初始化數(shù)據(jù)目錄
mysqld --defaults-file="D:\DevelopTool\mysql-5.7.17-winx64\my.ini" --initialize-insecure
它會(huì)初始化 data 目錄,在執(zhí)行此命令前請(qǐng)先把data目錄下的所有文件先刪除,否則會(huì)失敗
可以選擇用 --initialize-insecure 或者 --initialize 來(lái)初始化,--initialize-insecure 初始化root密碼為空,如果用 --initialize來(lái)初始化,會(huì)產(chǎn)生一個(gè)隨機(jī)密碼
執(zhí)行成功后,在data目錄下會(huì)生成mysql,perofrmance_schema,sys等目錄文件
6、安裝和啟動(dòng)mysql服務(wù)
#安裝服務(wù) mysqld -install #啟動(dòng)服務(wù) net start mysql #進(jìn)入mysql mysql -u root -p #移除mysql mysqld -remove
關(guān)于本站給大家提供的mysql專題大家可以參考下:
Mysql在各個(gè)系統(tǒng)的安裝教程
Mysql Root密碼操作技巧
MySql數(shù)據(jù)庫(kù)入門(mén)教程
MySQL中的數(shù)據(jù)庫(kù)操作知識(shí)匯總
以上所述是小編給大家介紹的MySql 5.7.17免安裝配置教程詳解,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)本站網(wǎng)站的支持!
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。