I found an answer to this problem in Dan Brown's 'How to change the MySQL root password in SME Server 5.1.2'
He gives three lines of commands to reset the root mysql password...
# /etc/rc.d/init.d/mysqld stop
# /etc/e-smith/events/actions/conf-mysql-password
# /etc/rc.d/init.d/mysqld start
And they worked a treat.
If anyone has the time to test it, here is a suitably modified Howto for upgrading from mysql 3 to mysql 4...
This changed Howto deals with problems found with update to MySQL 4.1.10a-standard on a box loaded with a customised 6.0.1 server. It adds lines from Dan Brown's 'How to change the MySQL root password in SME Server 5.1.2' to reset the MySQL root access password before attempting to use it to fix the privilege tables etc.
1) DOWNLOAD MySQL 4.0
Download MySQL 4.0 rpms from mysql.com in a fresh directory (Linux x86 RPM downloads section).
You need:
* MySQL-shared-compat-4.1.x-0.i386.rpm
* MySQL-server-4.1.x-0.i386.rpm
* MySQL-client-4.1.x-0.i386.rpm
* MySQL-devel-4.1.x-0.i386.rpm
Note: replace 4.1.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.1.x-0.i386.rpm
rpm -Uhv MySQL-server-4.1.x-0.i386.rpm
rpm -Uhv MySQL-client-4.1.x-0.i386.rpm
rpm -Uvh MySQL-devel-4.1.x-0.i386.rpm
Note: replace 4.1.x with current MySql version availaible (was 4.0.18 at time of writing)
5) CONFIGURE
chkconfig --levels 2345 mysql on
mv /etc/rc.d/init.d/mysql /etc/rc.d/init.d/mysqld
rm /etc/rc.d/rc7.d/S90mysqld
ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc7.d/S90mysqld
/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)
Now the added line...
/etc/e-smith/events/actions/conf-mysql-password
/etc/rc.d/init.d/mysqld start
Then to make sure that your grant tables are current when you update to the new version:
/usr/bin/mysql_fix_privilege_tables
More info here:
http://dev.mysql.com/doc/mysql/en/Upgrading-grant-tables.html6) 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