☆☆☆☆☆☆☆ 一.Windows7下配置免安裝版Mysql5.7.21 ☆☆☆☆☆☆☆

來源:互聯網
上載者:User

標籤:http   htm   cli   輸入密碼   blog   install   ice   bst   .so   

  • 1.下載安裝包
 

 

  • 2.解壓到本地目錄
F:\mysql-5.7.21-winx64 
  • 3.新增mysql環境變數
MYSQL_HOME = F:\mysql-5.7.21-winx64 
  • 4.修改Path環境變數
Path變數下,末尾新增 ;%MYSQL_HOME%\bin; 
  • 5.手動建立相關檔案夾/檔案(檔案內容為空白即可)
F:\mysql-5.7.21-winx64\xudebiaoF:\mysql-5.7.21-winx64\xudebiao\dataF:\mysql-5.7.21-winx64\xudebiao\logF:\mysql-5.7.21-winx64\xudebiao\log\mysql-error.logF:\mysql-5.7.21-winx64\xudebiao\tmpF:\mysql-5.7.21-winx64\xudebiao\tmp\mysql.sock 
  • 6.建立my.ini設定檔
# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.7/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.[client]port=3306socket=F:\mysql-5.7.21-winx64\xudebiao\tmp\mysql.sockdefault-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 = 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 = .....# socket = .....user=mysqlbasedir=F:\mysql-5.7.21-winx64datadir=F:\mysql-5.7.21-winx64\xudebiao\dataport=3306socket=F:\mysql-5.7.21-winx64\xudebiao\tmp\mysql.sockmax_connections=1000max_connect_errors=1000table_open_cache=1024max_allowed_packet=128Mcharacter_set_server=utf8collation-server=utf8_general_cilower_case_table_names=1log_error=F:\mysql-5.7.21-winx64\xudebiao\log\mysql-error.logslow_query_log=1long_query_time=1slow_query_log_file=F:\mysql-5.7.21-winx64\xudebiao\log\mysql-slow.logsymbolic-links = 0# 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 = 2Msql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES  
  • 7.準備工作做好的
 

 

 

 

 

 

 

   
  • 8.執行安裝命令
管理員身份運行"命令提示字元"進入F:\mysql-5.7.21-winx64\bin第一步執行初始化操作: mysqld --initialize-insecure第二步執行安裝服務作業: mysqld install第三步啟動mysql服務: net start MySQL【正常情況下這裡會直接提示成功。如果失敗了,上面第5步清空data(F:\mysql-5.7.21-winx64\xudebiao\data)目錄,再次執行命令】 
  • 9.修改初始密碼
mysql -u root -p第一次登陸沒有密碼, 輸入密碼的時候直接斷行符號 

 

set password = password(‘1990xxxx‘); 
  • 10.登陸測試
 

 

  • 11.確認編碼格式utf8
show variables like ‘%character%‘; 

 

好了, 可以開車上路了~

☆☆☆☆☆☆☆ 一.Windows7下配置免安裝版Mysql5.7.21 ☆☆☆☆☆☆☆

聯繫我們

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