解壓MySQL(F:\Program Files\MySQL\)MySQL安裝目錄 二 新建my.ini

創(chuàng)新互聯(lián)主營(yíng)東方網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,重慶APP開(kāi)發(fā),東方h5小程序開(kāi)發(fā)搭建,東方網(wǎng)站營(yíng)銷推廣歡迎東方等地區(qū)企業(yè)咨詢
在F:\Program Files\MySQL\下建立my.ini文件,內(nèi)容為 my.ini
[mysqld]
# 設(shè)置mysql的安裝目錄
basedir=F:\\Program Files\\MySQL
# 設(shè)置mysql數(shù)據(jù)庫(kù)的數(shù)據(jù)的存放目錄,必須是data,或者是\\xxx-data datadir=F:\\Program Files\\MySQL\\data # 設(shè)置mysql服務(wù)器的字符集,默認(rèn)編碼 default-character-set=latin1
[client]
# 設(shè)置mysql客戶端的字符集 default-character-set=latin1
[WinMySQLAdmin]
# 指定mysql服務(wù)啟動(dòng)啟動(dòng)的文件
Server=F:\\Program Files\\MySQL\\bin\\mysqld.exe
三 注冊(cè)MySQL服務(wù),使MySQL可以在服務(wù)項(xiàng)目中啟動(dòng)或關(guān)閉
1)進(jìn)入安裝目錄\bin,執(zhí)行:
F:\Program Files\MySQL\binmysqld -install
顯示:Service successfully installed. 則注冊(cè)服務(wù)成功。
如果要?jiǎng)h除服務(wù):
F:\Program Files\MySQL\binmysqld -remove 2)修改注冊(cè)表:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MySQL\ImagePath 修改為:
"F:\Program Files\MySQL\bin\mysqld" --defaults-file= "F:\Program Files\MySQL\my.ini" MySQL
這樣配置就可以使用net start mysql命令正常啟動(dòng)MySQL。
四 修改root密碼
MySQL配置好后,啟動(dòng)成功,默認(rèn)密碼是空,但是為了安全,設(shè)置密碼(一般用戶名為root,密碼為root)。
1)登錄MySQL root用戶:
進(jìn)入MySQL安裝目錄\bin,執(zhí)行:
F:\Program Files\MySQL\MySQL-6.0.7\binmysql -u root; 2)修改root密碼:
mysql update mysql.user set password=PASSWORD(''新密碼'') where User=''root'';
mysql flush privileges;
下面主要分為五大步給大家介紹mySql 5.7.14 解壓版安裝教程。感興趣的朋友一起看看吧。
第一步:下載最近的MySQL文件并且解壓:
下載最新版的MySQL–mysql-5.7.12下載地址
將下載到的文件解壓縮到自己喜歡的位置,例如我自己的位置是D:\MySQL\mysql-5.7.12-winx64
第二步:配置環(huán)境變量
這里不多說(shuō),bin目錄配置到path下面就行了。
第三步:添加配置文件
直接復(fù)制一個(gè)解壓路徑下面的 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);"[/spanmysqldspan 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/spanspan class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);"\mysql/span-5.7.12-winx64span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);"\ /spandatadir=D:span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);"\MySQL/spanspan class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);"\mysql/span-5.7.12-winx64span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);"\data/spanspan class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);"\ /spanport=3306/codeul 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
這里需要注意的主要有兩個(gè)問(wèn)題:
1、basedir是上面的你的mysql文件的解壓路徑。
2、在該路徑下面新建一個(gè)名為data的空文件夾,就是datadir。
第四步:初始化數(shù)據(jù)庫(kù)并且配置服務(wù)
在做這一步之前,一定要注意兩個(gè)問(wèn)題!!!切記!!!
第一: 以管理員自身份打開(kāi)CMD;
第二:用cd命令進(jìn)入到你MySQL文件的解壓路徑!
然后執(zhí)行 mysqld --initialize --user=mysql --console
執(zhí)行成功之后,在打印的文字的最后面是數(shù)據(jù)庫(kù)的初始密碼,記得要拷貝下來(lái),用鼠標(biāo)選中,回車一下找個(gè)地方ctrl+v就行了。
上面弄完之后,再管理員自身份打開(kāi)CMD執(zhí)行
mysqld --install MySQL –添加到系統(tǒng)服務(wù)
net start mysql –啟動(dòng)mysql服務(wù)
第五步:修改mysql的初始密碼
1、打開(kāi)CMD執(zhí)行 : mysql -u root -p
2、輸入你剛才保存的數(shù)據(jù)庫(kù)的初始密碼。
3、執(zhí)行 set password = password(‘***NewPassword***‘);
NewPassword的位置輸入你自己的新密碼就行了。
用7z工具解壓。
不想下載安裝文件,可以選擇PlatformIndependent,這樣可以直接下載zip文件。也可以選擇鏈接LookingforpreviousGAversions?,然后查看歷史版本,下載所需版本的驅(qū)動(dòng)jar根據(jù)需要選擇歷史版本下載。
當(dāng)前標(biāo)題:mysql中怎么解壓文件 mysql解壓后是個(gè)文件夾
分享路徑:http://chinadenli.net/article16/dojohdg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站、服務(wù)器托管、建站公司、自適應(yīng)網(wǎng)站、微信公眾號(hào)、品牌網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容