window建立mysql多執行個體

來源:互聯網
上載者:User

標籤:window建立mysql多執行個體

下載開源mysql,根據選擇響應的版本

https://dev.mysql.com/downloads/mysql/

安裝

如果遇到下面報錯

安裝報錯MSVCP120.dll  和 MSVCR120.dll

安裝vcredist_13x64

設定資料庫檔案

vim my.ini

[mysql]

default-character-set=utf8

[mysqld]

port = 3306

basedir=D:\mysql-5.7.18-winx64

datadir=D:\mysql-5.7.18-winx64\data

max_connections=200

character-set-server=utf8

default-storage-engine=INNODB



註冊,啟動資料庫


mysqld   install  mysql --defaults-file="D:\mysql-5.7.18-winx64\my.ini"

mysqld  --initialize

net start mysql


檢查3306連接埠,連結測試


執行個體N

將上面的mysql檔案夾拷貝到其他地方

更改my.ini內部,三個檔案配置

port = 3307

basedir=E:\mysql-5.7.18-winx64

datadir=E:\mysql-5.7.18-winx64\data

mysqld   install   mysql_test  --defaults-file="E:\mysql-5.7.18-winx64\my.ini"

mysqld  --initialize

更改註冊表

修改HKEY_LOCAL_MACHINE-->SYSTEM-->CurrentControlSet-->Services找到剛才建立的mysql_test,將ImagePath修改成如下":"E:\mysql-5.7.18-winx64\bin\mysqld" --defaults-file="E:\mysql-5.7.18-winx64\my.ini" mysql_testnet   start mysql_test

檢查3307連接埠

window建立mysql多執行個體

聯繫我們

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