-
下載zip包
進入官網下載頁面: http://dev.mysql.com/downloads/mysql/
下載mysql-5.6.23-win32.zip:
Windows (x86, 32-bit), ZIP Archive 5.6.23 342.3M (mysql-5.6.23-win32.zip) MD5:? d55ea458590c92060a790ba22e9b4222
?|? Signature -
解壓zip包
解壓zip包到E:\develop\database\mysql\ -
配置環境變量
新增MYSQL_HOME變量
MYSQL_HOME
E:\develop\database\mysql\mysql-5.6.21在PATH變量后追加
;%MYSQL_HOME%\bin
-
修改配置文件
復制my-default.ini為自己使用的配置文件(如: jian.ini),編輯后最終得jian.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. [mysql] #設置mysql客戶端的字符集 default -character-set = utf8 [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 = 256M # 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. # 設置mysql的安裝目錄 basedir = E:/develop/database/mysql/mysql- 5.6 . 21 # 設置mysql數據庫的數據的存放目錄 datadir = E:/develop/database/mysql/mysql- 5.6 . 21 / data # 設置綁定端口 port = 3366 # server_id = ..... #設置服務器段的字符集 character_set_server = utf8 # 允許最大連接數 max_connections = 10 # 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
-
安裝
以管理員身份運行cmd,輸入命令:
mysqld install jianSQLService --defaults-file="E:\develop\database\mysql\mysql-5.6.21\jian.ini"
-
啟動
net start jianSQLService
-
登錄
mysql -P3366 -uroot -p
參數說明:
-h: mysql服務器地址。若本機,可省略;
-P:?mysql服務器端口。若默認3306,可省略;
-u: 用戶名;
-p: 密碼。密碼為空,可省略。 -
修改root密碼
mysql> update mysql.user set password=password("jian") where User="root"; Query OK , 3 rows affected (0.00 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql > flush privileges; Query OK , 0 rows affected (0.00 sec)
-
關閉
net stop jianSQLService
-
卸載
慎用 。在放棄使用MySQL時,才用到此項 。
以管理員身份運行cmd,輸入命令:
mysqld –remove
或者
sc delete jianSQLService
?
-
參考
http://supportopensource.iteye.com/blog/1415527
?
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
