mysql5.7.17安裝教程分享給大家,供大家參考,具體內(nèi)容如下
從官網(wǎng)下載zip https://www.mysql.com/downloads/
解壓
D:devtoolmysql-5.7.17-winx64
將 D:devtoolmysql-5.7.17-winx64in 加入環(huán)境變量
在任務(wù)欄 windows圖標(biāo)上右鍵->命令提示符(管理員), 以管理員身份運(yùn)行 cmd , cd 到D:devtoolmysql-5.7.17-winx64in。 不以管理員運(yùn)行會出現(xiàn)權(quán)限不夠被拒絕
依次運(yùn)行以下三條命令
mysqld --initialize-insecure
會自動在 D:devtoolmysql-5.7.17-winx64 下創(chuàng)建data目錄,不必手工創(chuàng)建data目錄
mysqld -install
這步是安裝 mysql 服務(wù), 如果不是管理員運(yùn)行會提示 “Install/Remove of the Service Denied!” , 如果不cd到 mysql的bin目錄 服務(wù)安裝后路徑默認(rèn)在 C:Program FilesMySQL , 啟動服務(wù)會失敗 提示 “
發(fā)生系統(tǒng)錯誤 2。 系統(tǒng)找不到指定的文件”
net start mysql
這步是啟動mysql 服務(wù), 如果沒有第一步 這步會啟動失敗 并提示 “請鍵入 NET HELPMSG 3534 以獲得更多的幫助”
啟動mysql以后就可以 在cmd 中 輸入 mysql -u root -p enter 完成初次登陸了
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 7 Server version: 5.7.17 Copyright (c) 2000, 2016, Oracle and / or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and / or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql> |
參考資料:
從MySQL5.7.6開始,安裝MySQL提示“請鍵入 NET HELPMSG 3534 以獲得更多的幫助”的解決辦法
MySQL 5.6 for Windows 解壓縮版配置安裝
補(bǔ)充資料 :
啟動mysql以后就可以 在cmd 中 輸入 mysql -u root -p enter初次登陸了,按照以前的一些文章來看初始密碼為空但是直接enter后出現(xiàn)“ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)” 搜索后MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因 - 瀟湘隱者 - 博客園 這篇文章是Linux上的,但是提到生成了一個隨機(jī)密碼, 直接告訴我可能在自動生成的data目錄里能發(fā)現(xiàn)什么, 打開其中 “計(jì)算機(jī)名.err”的文件 (計(jì)算機(jī)名根據(jù)實(shí)際情況不同,不是本身這幾個字) 搜索password 果然搜到, 嘗試那個密碼成功
可以選擇用 --initialize-insecure 或者 --initialize 來初始化,--initialize-insecure 初始化root密碼為空,如果用 --initialize來初始化,會產(chǎn)生一個隨機(jī)密碼
——摘自 mysql 5.7.11 zip 安裝 - happymzw
官方文檔上有:https://dev.mysql.com/doc/refman/5.7/en/windows-initialize-data-directory.html
https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持服務(wù)器之家。