Create Second Mysql Instance without Errors in Windows



Hope,You have already installed first server.

1.Create a new data directory folder.
         E:\Mysql_Instance

2.Copy and Paste my.ini file here from first server data directory

3.Make following changes in my.ini



           [client]
           port=3307      #unique port no.
           
           [mysqld]
           port=3307
           datadir=E:/Mysql_Instance
           server-id=2
           rename log,error,slow query file names(optional)

save and close it

4.Open command prompt with administrative mode

5.Type below command
a)

mysqld --initialize-insecure --basedir="C:/Program Files/MySQL/MySQL Server 5.7/" --datadir="E:\Mysql_Instance\Data"


Now you can see default databases in that directory
          E:\Mysql_Instance\Data

b)Go to mysqld folder

cd /d C:\Program Files\MySQL\MySQL Server 5.7\bin 


c)Install Mysql server as Service and mention my.ini file in below command 

mysqld --install MysqlInstance1--defaults-file="E:\Mysql_Instance\my.ini"

6.Check in Services with MysqlInstance1 name

7.Enter into Mysql server with empty password and set root password











Comments

Popular Posts