MySQL 5.6 for Windows 解壓縮版配置安裝

來源:互聯網
上載者:User

標籤:mysql 5.6   windows   zip

MySQL是一個小巧玲瓏但功能強大的資料庫,目前十分流行。但是官網給出的安裝包有兩種格式,一個是msi格式,一個是zip格式的。很多人下了zip格式的解壓發現沒有setup.exe,面對一堆檔案一頭霧水,不知如何安裝。下面筆者將介紹如何解決此情況下安裝過程中的各種問題。


一、環境準備:

    1、win7 64位作業系統

    2、mysql-advanced-5.6.24-winx64.zip


二、解壓縮mysql-advanced-5.6.24-winx64.zip到E:\根目錄下,每個人可根據自己電腦的磁碟空間情況進行解壓縮.


解壓縮後的目錄如下:

        650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/6B/BE/wKiom1U1zc3z15LYAAHhkFZJzpE933.jpg" title="QQ圖片20150421121005.png" alt="wKiom1U1zc3z15LYAAHhkFZJzpE933.jpg" />


解壓完成後,資料庫並不能馬上使用,因為還需要進行配置。


三、配置環境變數:

        MYSQL_HOME=E:\mysql-advanced-5.6.24-winx64


配置方法如下:

            滑鼠右鍵點擊【電腦】,選擇【屬性】,點擊左側【進階系統設定】,點擊最下方的【環境變數】按鈕,進入環境變數設定表單:

            

            在下方【系統變數(S)】中選擇【建立】按鈕,在【變數名】文字框中輸入MYSQL_HOME,

在【變數值】文字框中輸入E:\mysql-advanced-5.6.24-winx64,點擊【確定】按鈕儲存。


            在下方【系統變數(S)】中找到並雙擊變數名為【Path】的環境變數,在變數值文字框的最前面加入E:\mysql-advanced-5.6.24-winx64\bin;,記住最後的分號不能掉,然後點擊【確定】按鈕儲存。


四、編輯E:\mysql-advanced-5.6.24-winx64\下面的my-default.ini檔案,修改其中的basedir和datadir兩個變數的值:

        

[mysqld]


# Remove leading # and set to the amount of RAM for the most important data

# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

# innodb_buffer_pool_size = 128M


# Remove leading # to turn on a very important data integrity option: logging

# changes to the binary log between backups.

# log_bin


# These are commonly set, remove the # and set as required.

basedir = E:\\mysql-advanced-5.6.24-winx64

datadir = E:\mysql-advanced-5.6.24-winx64\\data

#port = .....

# server_id = .....



# Remove leading # to set options mainly useful for reporting servers.

# The server defaults are faster for transactions and fast SELECTs.

# Adjust sizes as needed, experiment to find the optimal values.

# join_buffer_size = 128M

# sort_buffer_size = 2M

# read_rnd_buffer_size = 2M 


sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 



儲存檔案,並退出。


五、根據剛剛編輯好的設定檔,建立WINDOWS服務。


    以管理員身份運行cmd命令,打擊cmd命令表單,記住,必須要以管理員身份運行cmd命令,否則會因為許可權不足而導致建立失敗。

        
    650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/6B/BE/wKiom1U11TLy-JDVAAEJG41WLMU896.jpg" title="QQ圖片20150421124027.png" alt="wKiom1U11TLy-JDVAAEJG41WLMU896.jpg" />

        

        從中可以看出,首先運行mysqld  -install命令建立windows服務。


        然後使用net start mysql命令啟動MYSQL資料庫服務。


  六、登陸mysql資料庫

        650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/6B/BF/wKiom1U117HRx004AAILckJVxkY678.jpg" title="QQ圖片20150421124539.png" alt="wKiom1U117HRx004AAILckJVxkY678.jpg" />


        

        




        




本文出自 “濤哥的回憶” 部落格,謝絕轉載!

MySQL 5.6 for Windows 解壓縮版配置安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.