mysql免安裝方法

在官網上下載了個mysql-installer-community-5.6.27.0.msi,須要安裝環境,檢測未經過,很麻煩。以後網上查了資料以後直接下載了個壓縮包mysql-5.6.27-winx64.zip。解壓以後直接修改配置文件便可使用,不用安裝那麼麻煩。html

步驟:mysql

1.解壓,個人路徑爲:E:\Program Files (x86)\mysql\mysql-5.6.27-winx64sql

2.找到該目錄下以my-default.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.
  #mysql根目錄
  basedir = "E:\Program Files (x86)\mysql\mysql-5.6.27-winx64"
  #數據庫文件存放目錄
  datadir = "E:\Program Files (x86)\mysql\mysql-5.6.27-winx64\data"
# port = ..... 端口默認3306
# 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 
#服務端編碼方式
character-set-server=utf8
 [client]
 #客戶端編碼方式,最好和服務端保存一致
 loose-default-character-set = utf8
 [WinMySQLadmin]  
 Server = "E:\Program Files (x86)\mysql\mysql-5.6.27-winx64\bin\mysqld.exe"

3.註冊Mysql服務ui

  開始——運行——cmd,而後cd到mysql安裝目錄的bin下面,個人目錄就是「E:\Program Files(86)\mysql\mysql-5.6.22-win32\bin」,而後執行mysqld -install,提示服務安裝成功!運行services.msc一看,確實有一個名爲MySQL的服務了,啓動它。編碼

切記應以管理員身份運行,否則會報denied。spa

相關文章
相關標籤/搜索