Search code examples
winginx

Upgrade MySQL to 5.5 or above


I am trying to upgrade MySQL to 5.5 or above but having problems as mysqld in not in mysql/bin and after upgrading it cant find the right file locations.


Solution

  • If you used the MySql Installer, your files will most probably be located in the Windows program folder.

    If you want to continue, first uninstall MySql 5.5, then go on with updateing MySql in Winginx.

    If you want to upgrade the mysql version in Winginx, you can download the ZIP from http://dev.mysql.com/downloads/mysql/5.5.html

    I assume you installed Winginx in C:\Winginx

    1. Move the mysql folder from C:\Winginx\mysql to C:\Winginx\mysql.bak
    2. Create a new mysql folder under C:\Winginx
    3. Extract the 'share' and 'data' folders from the downloaded package to your empty 'mysql' folder.
    4. Extract the mysqld.exe from the package /bin folder to your 'mysql' folder
    5. Extract the my-small.ini from the package to your 'mysql' folder and rename it to 'my.ini'. Please note! You cannot use the my.ini shipped with Winginx. mysqld will fail with this my.ini for MySql 5.1.
    6. You need to add following lines to my.ini under the block [mysqld]

      # The MySQL server
      [mysqld]
      basedir = ../mysql
      datadir = data
      bind-address = 127.0.0.1
      

    If you need to change some settings, do not use the Winginx Workbench. It will add MySql 5.1 style settings to your my.ini and make the server fail. Directly update your my.ini if needed.

    I tried to continue to use the /data directory with my existing tables, but unfortunately the table format needs to be converted from 5.1 to version 5.5 format. For me the 'mysql-upgrade.exe' failed to convert my tables, so I had to start off with the default /data directory from the package and then migrate my data via mysqldump.