Setting up MySQL for the Web Application Installer
NOTE: The Web Application Installer is no longer being supported. The functionality has been integrated with the Web Platform Installer, providing a much more tightly integrated experience.
The Web Application Installer is a Beta product at this point. There were a few assumptions we made about MySQL installations, in the hopes of working with the 80% case. As a result, there are some MySQL installations that we won’t work well with and others that we just haven’t tested with enough to know if we will work or not. This article talks about the installations of MySQL that we know we work with.
MySQL Installation
For our testing, we used a MySQL installation performed using the MySQL Setup program for Windows. It’s the one labeled “Windows Zip/Setup.EXE”. We grabbed our copy from http://dev.mysql.com/downloads/mysql/5.0.html#downloads – either the 32-bit or 64-bit versions as appropriate.
This program will install MySQL by default in %SystemDrive%\Program Files\MySQL. This is the location we search for MySQL in. We need to be able to find the mySQL.exe client executable. We use this as the mechanism for all of our communication with MySQL.
When you install MySQL, there are two sections to the install - the actual installation, and then an optional trip through the Instance Configuration Wizard. We recommend using this Wizard – it makes setting up MySQL very straightforward. For most installations, use the defaults, unless you know enough about MySQL and your environment to make other choices. However, when running the Instance Configuration Wizard, please select the Detailed Configuration option. The most important items on the setup to make sure of are:
- Enable TCP/IP Networking – the default. Keep the TCP Port that MySQL uses to listen at 3306. We don’t have an option within the Web AI to select a different port for the database. If your database will be running on a separate system from the web server, make sure you check the “Add firewall exception for this port” checkbox.
- Include Bin Directory in Windows PATH – This isn’t strictly necessary, but as a long-time linux MySQL user, I can’t imagine working with MySQL without having the MySQL utilities available from the Command Line, or from PowerShell.
- Create An Anonymous Account. The default is to keep this disabled. If you add anonymous user support, you are risking a security breach into your database, unless you really know how to set up database users to protect your data. Also, if you enable anonymous users, the GRANT statements that we use to set up database users don’t work reliably. We’re working on a fix for this, but haven’t figured it out yet. Any MySQL users out there who know why, please let us know in the comments.
There is a wealth of information available on http://dev.mysql.com about tuning your MySQL environment for Windows. If performance is a concern, these resources will help you through. If you are setting up a development system, or one that is expecting a small amount of traffic, you won’t need much in the way of tuning, beyond accepting the defaults.