MySQL 5.6 Update on ePages Hosts | → 6.17.35 | Created: 6.17.26; Updated: 6.17.30 |
Starting with ePages 6.17.27, initial installation of ePages on Redhat/CentOS and Debian hosts comes with Oracle MySQL 5.6.
The patch ePages 6.17.27 does not upgrade MySQL. Following instructions describe how to upgrade Oracle MySQL 5.6 after patching to ePages 6.17.27.
NOTE: First patch to ePages 6.17.27 or higher, then upgrade MySQL 5.6.
Table of Contents |
Either update database client package epages-mysql.rpm or database server package epages-mysqld.rpm.
Update the ePages repository to the current version:
/var/epages/SetRepository.sh -r ftp://epages-software.de/repo/epages -b yum rpm -hUv ftp://epages-software.de/repo/epages/yum/epages-release.noarch.rpm
Check if database server package epages-mysqld is installed:
rpm -q epages-mysqld
If it is installed, update it:
yum -y update epages-mysqld --enablerepo epages-setup --enablerepo epages-base
If the installed MySQL server package is too old, update fails and the error output refers to a file with instructions on how to update to MySQL 5.6 (typically /var/lib/mysql/MYSQL-UPGRADE-5.6.README, see below).
Update the ePages repository to the current version:
/var/epages/SetRepository.sh -r ftp://epages-software.de/repo/epages -b yum rpm -hUv ftp://epages-software.de/repo/epages/yum/epages-release.noarch.rpm
Check if database client package epages-mysql is installed:
rpm -q epages-mysql
If it is installed, update it:
yum -y update epages-mysql --enablerepo epages-setup --enablerepo epages-base
If the installed MySQL server/client package is too old, update fails and the error output refers to a file with instructions on how to update to MySQL 5.6 (typically /var/lib/mysql/MYSQL-UPGRADE-5.6.README, see below).
MYSQL-UPGRADE-5.6.README is stored in datadir (configuration parameter of my.cnf; typically/default is /var/lib/mysql), find your datadir:
. /etc/default/epages6 get_mysql_option | sed -n 's/^--datadir=//p'
Depending on the installed MySQL server version the instructions in MYSQL-UPGRADE-5.6.README vary. Hereinafter the steps are just commented, find real execution instructions in MYSQL-UPGRADE-5.6.README.
0. Stop ePages services, run on any ePages host:
service epages6 stop
1. Create a complete, working backup of your data and my.cnf files.
Backup the datadir you find as described above. my.cnf files are typically stored in /etc/my.cnf* or /etc/mysql. Find your my.cnf file:
. /etc/default/epages6 my_cnf
2. Shut down the MySQL server.
Depending on the name of the MySQL server run sth. liks this (read MYSQL-UPGRADE-5.6.README):
service mysqld stop
3. Remove the existing MySQL packages.
Depending on the name of the MySQL server package run sth. liks this (read MYSQL-UPGRADE-5.6.README):
yum -y remove mysql-server rpm -e --nodeps mysql-libs mysql
4. Install the new Oracle MySQL server:
yum -y install MySQL-server
5. Start the new MySQL server:
/etc/init.d/mysql start
6. Run the 'mysql_upgrade' program.
If the MySQL root user has a PASSWORD set it here:
/usr/bin/mysql_upgrade -u root [-p PASSWORD]
7. Update the ePages package.
Either update epages-mysqld (database server package) or epages-mysql (database client package). If you want to update the database server package run:
yum -y install epages-mysqld --enablerepo epages-setup --enablerepo epages-base
8. Start ePages services, run on any ePages host:
service epages6 start
Further reading can be found in the Upgrading section of the MySQL manual.
Either update database client package epages-mysql.deb or database server package epages-mysqld.deb.
Check if database server package epages-mysqld is installed:
apt-cache search epages-mysqld
If it is installed, a) enable ePages setup repository:
sed -ri 's,^#\b(.*[0-9] ),\1,' /etc/apt/sources.list.d/epages.list
b) update it:
apt-get -y update apt-get -y -o Dpkg::Options::=--force-confdef install epages-mysqld
and c) disable ePages setup repository again:
sed -ri 's,^(.*[0-9] ),#\1,' /etc/apt/sources.list.d/epages.list
Check if database client package epages-mysql is installed:
apt-cache search epages-mysql
If it is installed, a) enable ePages setup repository:
sed -ri 's,^#\b(.*[0-9] ),\1,' /etc/apt/sources.list.d/epages.list
b) update it:
apt-get -y update apt-get -y -o Dpkg::Options::=--force-confdef install epages-mysql
and c) disable ePages setup repository again:
sed -ri 's,^(.*[0-9] ),#\1,' /etc/apt/sources.list.d/epages.list