mysql5.7.17安裝教程分享給大家,供大家參考,具體內容如下
從官網下載zip https://www.mysql.com/downloads/
解壓
D:devtoolmysql-5.7.17-winx64
將 D:devtoolmysql-5.7.17-winx64in 加入環境變量
在任務欄 windows圖標上右鍵->命令提示符(管理員), 以管理員身份運行 cmd , cd 到D:devtoolmysql-5.7.17-winx64in。 不以管理員運行會出現權限不夠被拒絕
依次運行以下三條命令
mysqld --initialize-insecure
會自動在 D:devtoolmysql-5.7.17-winx64 下創建data目錄,不必手工創建data目錄
mysqld -install
這步是安裝 mysql 服務, 如果不是管理員運行會提示 “Install/Remove of the Service Denied!” , 如果不cd到 mysql的bin目錄 服務安裝后路徑默認在 C:Program FilesMySQL , 啟動服務會失敗 提示 “
發生系統錯誤 2。 系統找不到指定的文件”
net start mysql
這步是啟動mysql 服務, 如果沒有第一步 這步會啟動失敗 并提示 “請鍵入 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 解壓縮版配置安裝
補充資料 :
啟動mysql以后就可以 在cmd 中 輸入 mysql -u root -p enter初次登陸了,按照以前的一些文章來看初始密碼為空但是直接enter后出現“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上的,但是提到生成了一個隨機密碼, 直接告訴我可能在自動生成的data目錄里能發現什么, 打開其中 “計算機名.err”的文件 (計算機名根據實際情況不同,不是本身這幾個字) 搜索password 果然搜到, 嘗試那個密碼成功
可以選擇用 --initialize-insecure 或者 --initialize 來初始化,--initialize-insecure 初始化root密碼為空,如果用 --initialize來初始化,會產生一個隨機密碼
——摘自 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
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持服務器之家。