mysql5.6解壓版安裝


第一步:解壓mysql,例如解壓后的目錄在C:\Program Files\mysql-5.6.36-winx64

第二步:配置mysql環境變量,類似配置java的環境變量

計算機右鍵===>屬性===>高級系統設置===>高級===>環境變量

新建系統變量:

變量名:MYSQL_HOME

       變量值:C:\Program Files\mysql-5.6.36-winx64

編輯系統變量Path,追加%MYSQL_HOME%\bin;

 

第三步:進入C:\Program Files\mysql-5.6.36-winx64,將my-default.ini重命名為my.ini,並進行如下配置(紅色字體):

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the

# *** default location during install, and will be replaced if you

# *** upgrade to a newer version of MySQL.

 

[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 = .....

# datadir = .....

# port = .....

# server_id = .....

basedir = C:\Program Files\mysql-5.6.36-winx64

datadir = C:\Program Files\mysql-5.6.36-winx64\data

character_set_server=utf8

 

# 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

[client]

default-character-set=utf8

 

第四步:使用管理員操作DOS命令,依次輸入:

              進入mysql的bin目錄:cd C:\Program Files\mysql-5.6.36-winx64\bin

              安裝mysql:mysqld –install

              啟動mysql服務器:net start mysql

              登陸mysql:mysql –uroot –p   回車,這時提示輸入密碼,暫時沒有密碼,直接回車即可

 

第五步:修改mysql的root賬戶的密碼,繼續輸入如下命令:

use mysql;

update user set password=password("新密碼") where user="root";

flush privileges;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM