win10 安裝mysql-5.7.19-winx64

來源:互聯網
上載者:User

標籤:安裝   win10   mysql   

問:配置低不方便老開虛擬機器還想學習一下mysql 怎麼辦,答:安裝在自己的Windows上。

O(∩_∩)O 好了廢話不多說,下面開始

1、  下載mysql-5.7.19-winx64包,沒有的去mysql網站https://dev.mysql.com/downloads/mysql/

上下載,這裡我選擇的是64bit的也可以選擇32bit 如:

650) this.width=650;" src="https://s2.51cto.com/wyfs02/M01/9D/CF/wKiom1mGwxvh0L9NAADozdua5lQ321.jpg-wh_500x0-wm_3-wmp_4-s_1017308895.jpg" title="1.jpg" alt="wKiom1mGwxvh0L9NAADozdua5lQ321.jpg-wh_50" />

2、解壓縮到你指定的目錄,我這裡指定的E:\mysql-5.7.19,預設沒有my.ini 檔案的,需要手動建立一個

650) this.width=650;" src="https://s1.51cto.com/wyfs02/M01/9D/CF/wKiom1mGw0aRk0cdAAB3DTJTcMo581.jpg-wh_500x0-wm_3-wmp_4-s_199818575.jpg" title="1.jpg" alt="wKiom1mGw0aRk0cdAAB3DTJTcMo581.jpg-wh_50" />

3、手動建立my.ini檔案添加如下資訊

[client]port=3306default-character-set=utf8 [mysqld]# 設定為自己MYSQL的安裝目錄basedir=E:\mysql-5.7.19# 設定為MYSQL的資料目錄datadir=G:\mysql_dataport=3306character_set_server=utf8sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER #開啟查詢快取explicit_defaults_for_timestamp=trueskip-grant-tables

4、  設定環境變數

電腦->屬性->進階系統屬性->環境變數

650) this.width=650;" src="https://s3.51cto.com/wyfs02/M02/9D/CF/wKioL1mGw8PChNUGAAE_ARPvKDQ401.jpg-wh_500x0-wm_3-wmp_4-s_521718044.jpg" title="1.jpg" alt="wKioL1mGw8PChNUGAAE_ARPvKDQ401.jpg-wh_50" />

5、載入配置並安裝

650) this.width=650;" src="https://s2.51cto.com/wyfs02/M02/9D/CF/wKiom1mGxAmjINgKAABtOWol_70719.jpg-wh_500x0-wm_3-wmp_4-s_1528880053.jpg" title="1.jpg" alt="wKiom1mGxAmjINgKAABtOWol_70719.jpg-wh_50" />

中間那段報錯是因為第一次在data檔案夾裡面組建檔案了,所以會報錯

(記得一定用管理員身份運行cmd不然會報錯)


6、在執行如下兩條命令完成安裝

mysqld install 
net start mysql

 

安裝完後查看error 日誌紅色為預設密碼。

2017-08-02T05:19:34.830669Z 0 [Warning] InnoDB: New logfiles created, LSN=45790

2017-08-02T05:19:35.827224Z 0 [Warning] InnoDB: Creatingforeign key constraint system tables.

2017-08-02T05:19:36.155385Z 0 [Warning] No existing UUIDhas been found, so we assume that this is the first time that this server hasbeen started. Generating a new UUID: 2cd21090-7742-11e7-953c-507b9de19f84.

2017-08-02T05:19:36.202484Z 0 [Warning] Gtid table is notready to be used. Table ‘mysql.gtid_executed‘ cannot be opened.

2017-08-02T05:19:36.202484Z 1 [Note] A temporary passwordis generated for [email protected]: kQrFq?Fti2,m


7、使用如下命令修改預設密碼mysqladmin -u root -p password

650) this.width=650;" src="https://s5.51cto.com/wyfs02/M00/9D/CF/wKioL1mGxGrgSd3YAAB3386MGUY231.jpg-wh_500x0-wm_3-wmp_4-s_4077259758.jpg" title="1.jpg" alt="wKioL1mGxGrgSd3YAAB3386MGUY231.jpg-wh_50" />

也可以進入到mysql裡面去修改密碼

set password for [email protected] = password(‘123456’);


8、登入mysql 查看是否安裝成功

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M01/9D/CF/wKiom1mGxJnTcbiUAADQxr1RmZI772.jpg-wh_500x0-wm_3-wmp_4-s_1020754408.jpg" title="1.jpg" alt="wKiom1mGxJnTcbiUAADQxr1RmZI772.jpg-wh_50" />

本文出自 “實踐是檢驗真理的唯一標準” 部落格,請務必保留此出處http://laobaiv1.blog.51cto.com/2893832/1954006

win10 安裝mysql-5.7.19-winx64

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.