Hello,
as you may have noticed, CentOS 5.10 has stopped upstream updates for its stock MySQL version which is stuck at version 5.0.95. They have added MySQL 5.5 now to their repository but these packages are installed in different locations and have other startup-scripts then the default stock version, so that they can be run at the same time, but that's not very compatible with Ensim and its database management. Therefore I wrote a small upgrade script which removes MySQL 5.0 and installs 5.5, taking care of Ensim's database structure. Here are some script requirements:
- python 2.4+ installed
- EPEL and IUS repositories installed
- all stock mysql55 packages excluded in yum (found in /etc/yum.repos.d/CentOS-Base.repo)
Here how to do the upgrade:
- download my script and place it wherever you want and unzip it
- check if all requirements above are fulfilled
- launch my script with: python /path/to/upgrade_ensim_mysql.py
-
edit /etc/virtualhosting/filelists/mysql.sh and add following lines to it:
N:S,rpm:mysql55
N:S,rpm:mysql55-server
N:S,rpm:mysql55-libs
N:S,rpm:mysqlclient15 - edit /etc/init.d/mysqld and remove the parameters –skip-bdb and –skip-innodb
- now restart your mysql server as usual and do an ensim maintenance
For all the admins who are sceptic about user programmed scripts, here is what it basically does:
-
backup old needed files
/etc/my.cnf
/etc/init.d/mysqld_app_init
complete mysql dump to /root/mysql_backup.sql - removes mysql5.0 packages without their dependencies
- installs needed mysql55 packages
-
unlinks all symlinks and relinks the databases
this step is needed because mysql50 supported database names with "-" in it, mysql55 doesn't, thus the "-" is replaced by "@002d" in the symbolic link - upgrades all database using mysql_upgrade