Documentation > How-to Classification > MySQL > How to Upgrade MySQL to 4.0.x for SME Server


About this HowTo

Authors: john, Laurent Dinclaux
Source: http://mirror.contribs.org/smeserver/contribs/star/mitel/contrib/howto-mysql4.txt
See Also: http://forums.contribs.org/viewtopic.php?t=18597
See Also: http://forums.contribs.org/viewtopic.php?t=7965
See Also: http://dev.mysql.com/doc/mysql/en/Upgrading-from-3.23.html
Tested on: SME Version 6.01 GPL, SME 6.0, SME 5.6 Unsupported developper release
Created: 24 Mar 2004
License: GPL
Summary: This HowTo enable you to upgrade MySql to 4.0
Keywords: My SQL, MySQL, MySQL4, MySQL 4, MySQL4.0, MySQL 4.0
Certification: Contribs.org in progess here


1) DOWNLOAD MySQL 4.0

Download MySQL 4.0 rpms from mysql.com in a fresh directory (Linux x86 RPM downloads section).

You need:

Note: replace 4.0.x with current MySql version availaible (was 4.0.18 at time of writing)

2) STOP MYSQL

service mysqld stop


3) REMOVE OLD RPMS

rpm -e --nodeps mysql mysql-client mysql-server
rpm -e mysql-devel
rpm -e mysqlclient9


4) INSTALL NEW RPMS

Cd to the directory where you downloaded the rpms and do:

rpm -Uvh MySQL-*.rpm

OR

rpm -Uhv MySQL-shared-compat-4.0.x-0.i386.rpm
rpm -Uhv MySQL-server-4.0.x-0.i386.rpm
rpm -Uhv MySQL-client-4.0.x-0.i386.rpm
rpm -Uvh MySQL-devel-4.0.x-0.i386.rpm


Note: replace 4.0.x with current MySql version availaible (was 4.0.18 at time of writing)

5) CONFIGURE

ln -s /etc/rc.d/init.d/mysql /etc/rc.d/init.d/mysqld

chkconfig --levels 2345 mysqld on
chkconfig --levels 016 mysqld off

/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no (to enable remote access)
/sbin/e-smith/expand-template /root/.my.cnf

ln -s /usr/sbin/mysqld /usr/libexec/ (for conf-mysql-password script)

service mysqld restart


Then to make sure that your grant tables are current when you update to the new version:

/usr/bin/mysql_fix_privilege_tables


More infos there: http://dev.mysql.com/doc/mysql/en/Upgrading-grant-tables.html

6) OPTIONAL: INNODB SUPPORT

Create a custom-template fragment:

mkdir -p /etc/e-smith/templates-custom/etc/my.cnf
cp /etc/e-smith/templates/etc/my.cnf/009innodb /etc/e-smith/templates-custom/etc/my.cnf
pico /etc/e-smith/templates-custom/etc/my.cnf/009innodb

And comment the only line it contains so the file should look like this:

#skip-innodb

Save the file then do:

/sbin/e-smith/expand-template /etc/my.cnf
service mysqld restart




Documentation > How-to Classification > MySQL > How to Upgrade MySQL to 4.0.x for SME Server

Add your comments about this How To