I have seen a lot of versions of this in the web but I decided to create my own copy for ease of setup and simplicity.
First, download the file “mysql55rev.rar” as seen in this post then extract it somewhere in your harddrive.
Follow these steps:
note: extract-dir is the location which you extracted the archive
edit [extract-dir]\my.ini to match your prefernces
# SERVER SECTION
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# The TCP/IP Port the MySQL Server will listen on
#Path to installation directory. All paths are usually resolved relative to this.
#Path to the database root
commands via the windows command line (cmd)
[extract-dir]\bin\mysqld.exe --install "mysql3307" --defaults-file="[extract-dir]\my.ini"
net start mysql3307
use this code if you wish to disable and uninstall the mysql instance
net stop mysql3307
[extract-dir]\bin\mysqld.exe --remove "mysql3307"
Credentials needed to access the database are included in the archive.
If you wish to create just a separate instance and you already have the binaries, you don’t have to copy the binaries again, instead, just create a new my.ini and specify a different port and data directory. On a side-note, if you encounter an error like “Could not locate mysql.user” when trying to start the server, you need to copy the mysql folder and the performance_schema folder located in the [extract-dir]\data folder from your existing mysql instance to the new instance data folder.
After you have installed the mysql instance as a service via mysqld.exe –install, you can now see the installed service in windows, you can start/stop them manually from here as well.
open the services window:
manually configure the installed mysql instances:
If you have downloaded the mariadb, you can install a new instance keeping the existing binaries following the instructions at the beginning of this configuration file. You may also use this configuration file as basis of your default my.cnf.