The MySQL database management system, available under the GNU license (also available under a number of other propriety licenses) is very popular, especially for web applications, due to its speed. I believe part of its speed is because it had certain features one comes to expect in DBMSs missing. Some of these features included referential checking. One feature for me that I really missed, that I had available to me in Microsoft’s SQL Server was support for stored procedures. MySQL AB added support for stored procedures in version 5.0. That is totally awesome! Time to upgrade to 5.0.
To get MySQL 5.2.5 (which is the latest release version at the time of this posting), you can go to the downloads section of the site and download the “MySQL Community Server” version which is released under the GNU license. There really isn’t too much technical difference between the “MySQL Community Server” version and the “MySQL Enterprise” version other than with the enterprise version you get the added on services such as updates, testing and monitoring, technical support etc. The kinds of services you would need if you were running your enterprise data and applications on MySQL. Since my needs are rather minimal (for now) I will stick to the community server.
Before I continue, you need to note that I am installing MySQL on a Windows XP Pro machine that I use for development in addition to the everyday computer usage. In addition, I am doing a fresh clean install and not upgrading from a previous version. This is important to note because somewhere in the process I had to delete certain data files and so I didn’t have to worry about losing any valuable data. If you are upgrading and your have data that you want to preserve, my advice is to back-up all your data and then make sure you can restore that data before taking down your old MySQL install!
Now back to the installation. For the most part, installing MySQL 5.x is pretty straightforward.
The first step is installing the core engine. All you need to do is double-click on the installer and follow the wizard prompts to install the engine.
Once that is complete, the next step you’ll take is to configure your database instance. At the end of the core engine install, you will be given the opportunity to configure the install. If you choose choose not to at this time, or you want to reconfigure your instance, you can launch the wizard by going to
Start Menu > Programs > MySQL > MySQL Server 5.0 > MySQL Server Instance Config Wizard
Once you have launched the wizard, once again most of the configuration options are straight forward and will depend on your preferences. Once you have all your preferences selected, you will click the ‘Execute’ button so that the instance will be configured. This is where it can get a little tricky. The wizard performs four main actions. The first two actions, 1. ‘Prepare the Configuration’ and 2. ‘Write Configuration File’ are pretty much straightforward.
The third step, ‘Start Service’ tends to have a problem for many, in that case, they will get the following error,
‘The service could not be started. Error: 0.’.
The screenshot below shows what the error message looks like.
To fix this error, you will want to navigate to your ‘data’ folder in your MySQL install directory, i.e.
…\MySQL\MySQL Server 5.0\data
and delete the following three files
At this point, you should now be able to rerun the wizard and move part the third step that is ‘Start the Service’.
I also had a problem with the forth step which was ‘Apply Security Settings’. The wizard below shows the error that I got, i.e. ‘
The security settings could not be applied
Error Number 2003.
Can’t connect to MySQL server on ‘localhost’ (10061)
This one was even trickier to solve since none of the advice over the internet was able to solve this problem. Eventually I was able to solve this kind of by luck. All I did was to click the ‘Back’ button, then the ‘Execute’ button to rerun the four configurations steps… and it worked. Just like that! Pretty bizarre I must say.
I haven’t had any problems at all though and I now a full working install of MySQL 5.2.5 working on my desktop. I also have local copy of WordPress running very smoothly so I know my MySQL install is running fine.
There are a couple of things to note. Even though I claim that I was doing a fresh clean install, I actually had a previous install of MySQL 5.1 which I had corrupted when I was playing around with the settings. Since I didn’t actually have any data stored in the database, I wasn’t too worried about having corrupted the database and rather than trying to repair it, I decided to upgrade to 5.2.5. So I uninstalled the older instance and installed 5.2.5. My understanding about MySQL is that when you uninstall it, the uninstall process does not remove the contents of the …\data folder for obvious reasons. If this is the case, then this will explain why one would get the The service could not be started. Error: 0.’ error in step 3 and consequently why one would need to go in and delete the three mentioned files. This is also why you must back-up your database before upgrading!
Hope this posting is helpful if you have having issues installing/upgrading MySQL