MySQL 5.1 installation bug (Windows)

I need to install MySQL 5.1.52 server in XP SP3 x32 for work. However, it’s found that there is a bug in normal installation in MySQL community server msi package . At the end of the installation , the installation will hang at “Start service” :
mysql3.JPG

Then I check error from reading C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\.err :

101102 17:22:32 [Note] Plugin ‘FEDERATED’ is disabled.
101102 17:22:32 InnoDB: Error: unable to create temporary file; errno: 2
101102 17:22:32 [ERROR] Plugin ‘InnoDB’ init function returned error.
101102 17:22:32 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
101102 17:22:32 [ERROR] Unknown/unsupported table type: INNODB
101102 17:22:32 [ERROR] Aborting

101102 17:22:32 [Note] C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: Shutdown complete

The reason for failure in “Start Service” is that it fail to create temporary file in temp directory . After google a while , an environment variable tmpdir is missing in C:\Program Files\MySQL\MySQL Server 5.1\my.ini , so an extra line should be added like (red line) :

……
#Path to installation directory. All paths are usually resolved relative to this.
basedir=”C:/Program Files/MySQL/MySQL Server 5.1/”

#Path to the database root
datadir=”C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/”
tmpdir=”C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/”
…..

However, after adding this line in my.ini , it cannot make the installation finish properly by re-running the reconfiguration the Mysql instance , because it will overwrite configuration file “my.ini” during the progress . Hence , I copied the edited “my.ini” out somewhere . Then I uninstall the just-installed Mysql . Afterwards, I download and install the “no install ” version “mysql-noinstall-5.1.52-win32.zip” from :

http://dev.mysql.com/downloads/mysql/5.1.html

Then extract the zip file and move that folder to the original installed path “C:/Program Files/MySQL/” and rename it as “MySQL Server 5.1/” , we can skip the creation of option file , or selecting MySQL Server Type because this my.ini is already configured from previous GUI in msi package , and hence I simply copy my my.ini back to “C:/Program Files/MySQL/MySQL Server 5.1/” . Then simply follow the instruction on installation in: http://dev.mysql.com/doc/refman/5.1/en/windows-install-archive.html to customize the path for Mysql Tools , and start MySQL server as Windows service , then finally Secure the default user accounts.

You may also like...