MySQL is a relational database direction arrangement. The server can exist run as a Windows service using FireDaemon Pro, which allows you to have the server start automatically at kicking prior to login, showtime multiple instances of the server and more. You can also apply Fusion to manage FireDaemon and other Windows services via a web browser.

NOTE: In that location are 3 versions of MySQL server but this HOWTO volition merely exist focusing on the MySQL Customs Server because it is costless.

MySQL Server Setup Nether FireDaemon Pro

Download the latest stable MySQL Server from here as a ZIP file. Some x86 applications have problems connecting to x64 MySQL servers so if you accept issues making a database connectedness, then you will need to reinstall the MySQL server with the x86 binaries. Install the application. By default it installs to C:\Program Files\MySQL\SQL Server X.Ten. Throughout this HOWTO the folder name is referred to equally "SQL Server X.10". This is because MySQL is updated often and rather than having this HOWTO refer to an out of date version, we are using a generic one. So replace X.X with whatever version you're installing.

If you want full functionality, then on step 3 of the installation (Setup Type), choose Total.

If you just want a basic MySQL server, and then on step 3 of the installation (Setup Type), choose Custom. On the "Characteristic Pick" window only exit "MySQL Server X.10" and "Documentation" checked. Uncheck everything else.

On the "Configuration" window, you take 3 options. You lot but have to pay attention to i of them: "Server Configuration Blazon". In about cases y'all'll be running the MySQL server off of the same computer as other servers (eastward.grand. spider web server, game server, etc.) so you should select "Server Machine" as your Config type. If the MySQL server is the simply server on the reckoner, so you should select "Dedicated Machine".

On the "Configuration" window, select a root countersign. Go far as secure as you possibly can (12 characters recommended with numbers, letters and symbols). In order to safely shut downward your MySQL server you will as well need to create a new user that merely has shutdown as a global privilege. Accept note of the password every bit you will need information technology later in this HOWTO.

On the "Configuration" window, uncheck "Start the MySQL Server on System Startup", as FireDaemon volition take care of this.

Install FireDaemon Pro into the directory of your option, typically C:\Program Files\FireDaemon. FireDaemon Pro can be downloaded from here.

MySQL Server installs its own Windows Service and so you lot volition need to disable it before you setup your FireDaemon Service. Click the filter button on the FireDaemon Pro window and scroll down to MySQLxx. Double click the MySQL service, click the Stop push and change the startup type to "Disabled". Click OK and click the Filter button to switch back to FireDaemon services merely.

Adjacent first the FireDaemon GUI from the desktop shortcut. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the data into the fields as you see beneath. Conform the paths to suit your installation. Pay special attention to the Parameters list.


The nigh important field on the tab is the Parameters. The Parameters define the initial setup of your MySQL server.

Here'south the full parameter list you should have:
--defaults-file="C:\ProgramData\MySQL\MySQL Server X.Ten\my.ini"

  • "--defaults-file" Loads the my.ini config from a directory. The directory above is the default one, if you inverse it during installation, you will accept to alter it here as well.

Now click on the Settings tab. If you DON'T want to meet MySQL Server running, uncheck the Collaborate with Desktop cheque box & select "Subconscious" from the "Show Window" dropdown. Exist sure to select "Global Job" from the Task Blazon field so the Windows service will close down properly. You can optionally run the MySQL server as the user you installed it as. In the Logon Account field blazon your username (due east.thou. Administrator) and then enter the user's password twice in the Password and Confirm fields. You can change the Process Priority to classify more than CPU time to the MySQL server or specify which CPU or core the MySQL server volition run on, in the case of multi-processor, hyperthreaded or multi-core CPUs.

Now click on the Lifecycle tab. Ready "Maximum Shutdown Filibuster" to a high number. Here we take it ready to 5 minutes (300000 ms). Your database might need a longer menstruation to shut down. Meet the lesser of this HOWTO for more than information.
mysql-as-a-service-lifecycle.png

Now click on the Pre/Mail service-Service tab and enter the post-obit into the Post Service section:

Executable: C:\Program Files\MySQL\MySQL Server X.Ten\bin\mysqladmin.exe
Working Directory: C:\Program Files\MySQL\MySQL Server X.X\bin
Parameters: -u shutdown -pPASSWORD -P 3306 shutdown
Execution Time: 300000
Run Program: Before Event
Run Detached: [Checked]


Make sure to replace "Password" with the password you set for your shutdown account. If you oasis't made i nevertheless, and so delight refer to step five. Besides brand sure that you change the port number if you changed it during installation.

At present click on the Install button to install and start MySQL Server!

Figuring out the best value for Maximum Shutdown Delay

If your database is big, then five minutes may non exist plenty time to shut information technology downwardly safely. The best style to figure out exactly how much time you need is to time it.

Open Windows Job Manager and curlicue down to mysqld.exe

Open a panel window (cmd.exe) and motion the panel window so yous tin can see mysqld.exe in Windows Chore Manager. Enter the post-obit, making sure to supercede PASSWORD with the password y'all set for your shutdown user. If yous changed the MySQL port, brand sure to alter it hither too:

"C:\Program Files\MySQL\MySQL Server X.X\bin\mysqladmin.exe" -u shutdown -pPASSWORD -P 3306 shutdown


Do not press Enter yet.
Make certain you lot tin come across mysqld.exe in task manager behind the command window. Now grab a stopwatch. Right when you press enter, press start on your stopwatch. Now pay attention to mysqld.exe in Task Manager. Right when it exits, press stop on your stop watch.

Take the time you recorded, add 10 to 25% more time to it and then use that as your Maximum Shutdown Filibuster. For example, let's say it took 60 seconds for your database to shut down. x% of lx is vi seconds. But you can't enter 66 into FireDaemon because milliseconds is the only unit accepted. To go milliseconds, multiply seconds by m (or click hither for a converter). Yous might need to do this process again if the time y'all chose is no longer enough.

Database Direction

There are three ways you lot can employ to create and manage your databases.

  1. Command line: This tin can exist fast for repetitive things but it does have a learning curve and isn't the easiest affair to do.
  2. PhpMyAdmin: This is a web based manager just it requires y'all to gear up upwardly a web server with PHP. It's also a security risk because hackers tin fauna force hack their way into your database (since the database tin can be managed remotely through a web browser).
  3. sqlYOG: This is the recommended one. It's a desktop application that gives you complete control over your databases and since its non accessible from the internet, you're protected against brute force password hacks! You lot will need remote desktop or physical access to the computer to use it though. You tin can download the free version here.