Setting up MySQL for the Web Application Installer

Posted: Oct 17, 2008  25 comments  

Average Rating

Share this Post

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.

Comments

Where is the MySQL.exe?

I downloaded the MYSQL and went through the setup and then the configuration wizard... I can't seem to find the MYSQL.exe though. Is it hidden some where?

Oct 24 2008 by rla6907

Where it is depends on which MySQL Installation you downloaded and how you installed it.  On my system, which installed MySQL 5.0 using the Windows installer, mysql.exe can be found in C:\Program Files\MySQL\MySQL Server 5.0\bin.

Oct 29 2008 by stjacobs

Thank you for sharing useful information.Can anyone provide tips and tricks on installation of Mysql.

<a href="www.developer4lease.com/"> Developer4lease-Web Business,

                 Application Development</a>

Nov 06 2008 by Anonymous

yes but mysql is not in the default web site. I don't think you're supposed to cut/copy and paste it into the IIS path.

Nov 30 2008 by cuppajava

Does it support MySql 5.1?

Dec 08 2008 by Anonymous

Installed mySQL under Win2k8 x64 and the WPAI is saying it's not installed.  

Is this because it's installed under \Program Files (x86) and not under \Program Files ???

Jan 26 2009 by Anonymous

If you're running on a 64 bit system and you install the 32-bit version of MySQL, it will be installed under Program Files (x86).  On 64-bit systems, the Web AI is looking for the install of mysql under Program Files, which is where the 64 bit version will be installed.

Jan 28 2009 by stjacobs

Also, I just checked - MySQL has changed the default download to 5.1.  We're explicitly looking for 5.0.  We haven't fully tested 5.1 yet, so the Web AI won't work with it.

Jan 28 2009 by stjacobs

Having problems with MySQL 5 installation. It never got fully installed so when it entered the configuration wizard it simply hung. Trying to uninstall now but is also hanging on that as well now.

Feb 16 2009 by MarkJBrown

Submit a Comment

  • Plain text is accepted.
  • URLs starting with http:// are converted to links.