MySql 5.7.14 解壓版安裝步驟詳解
下面主要分為五大步給大家介紹mySql 5.7.14 解壓版安裝教程。感興趣的朋友一起看看吧。
第一步:下載最近的MySQL文件并且解壓:
下載最新版的MySQL–mysql-5.7.12下載地址
將下載到的文件解壓縮到自己喜歡的位置,例如我自己的位置是D:\MySQL\mysql-5.7.12-winx64
第二步:配置環(huán)境變量
這里不多說,bin目錄配置到path下面就行了。
第三步:添加配置文件
直接復(fù)制一個解壓路徑下面的 my-default.ini文件,重命名為my.ini然后編輯該文件,內(nèi)容如下:
<code class="hljs tex has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"> <span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">[</span>mysqld<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">] </span> basedir=D:<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\MySQL</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\mysql</span>-5.7.12-winx64<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\ </span>datadir=D:<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\MySQL</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\mysql</span>-5.7.12-winx64<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\data</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\ </span>port=3306</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right: 1px solid rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li> <li style="box-sizing: border-box; padding: 0px 5px;">2</li> <li style="box-sizing: border-box; padding: 0px 5px;">3</li> <li style="box-sizing: border-box; padding: 0px 5px;">4</li> </ul>
這里需要注意的主要有兩個問題:
1、basedir是上面的你的mysql文件的解壓路徑。
2、在該路徑下面新建一個名為data的空文件夾,就是datadir。
第四步:初始化數(shù)據(jù)庫并且配置服務(wù)
在做這一步之前,一定要注意兩個問題?。?!切記!??!
第一: 以管理員自身份打開CMD;
第二:用cd命令進入到你MySQL文件的解壓路徑!
然后執(zhí)行 mysqld --initialize --user=mysql --console
執(zhí)行成功之后,在打印的文字的最后面是數(shù)據(jù)庫的初始密碼,記得要拷貝下來,用鼠標選中,回車一下找個地方ctrl+v就行了。
上面弄完之后,再管理員自身份打開CMD執(zhí)行
mysqld --install MySQL –>添加到系統(tǒng)服務(wù) net start mysql –>啟動mysql服務(wù)
第五步:修改mysql的初始密碼
1、打開CMD執(zhí)行 : mysql -u root -p
2、輸入你剛才保存的數(shù)據(jù)庫的初始密碼。
3、執(zhí)行 set password = password(‘***NewPassword***‘);
NewPassword的位置輸入你自己的新密碼就行了。
以上所述是小編給大家介紹的MySql 5.7.14 解壓版安裝步驟詳解,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
Mysql實現(xiàn)合并多個分組(GROUP_CONCAT及其平替函數(shù))
MySQL 中提供了多種合并字符串的函數(shù)和操作方法,包括 GROUP_CONCAT、CONCAT_WS 和 CONCAT 等,本文介紹了 MySQL 中 GROUP_CONCAT 函數(shù)以及 CONCAT_WS、CONCAT 函數(shù)并通過示例代碼演示了它們的用法,感興趣的可以了解一下2023-10-10完美解決mysql in條件語句只讀取一條信息問題的2種方案
使用mysql多表查詢時一個表中的某個字段作為另一表的in查詢條件,只能讀取一條信息,而直接用數(shù)字的話可以正常讀取2018-04-04MySQL 處理插入過程中的主鍵唯一鍵重復(fù)值的解決方法
本篇文章主要介紹在插入數(shù)據(jù)到表中遇到鍵重復(fù)避免插入重復(fù)值的處理方法,主要涉及到IGNORE,ON DUPLICATE KEY UPDATE,REPLACE的相關(guān)知識,感興趣的朋友一起學(xué)習(xí)吧2016-04-04