error upgrading mysql to 5.0

ztar

Verified User
Joined
Mar 3, 2006
Messages
11
Location
Melbourne, Victoria
i get the following error when attempting to upgrade mysql from 4 to 5.0 - server is CentOS 4.xx

error: %pre(MySQL-server-5.0.81-0) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping MySQL-server-5.0.81-0

Does this mean that I have to manually remove the mysql 4 RPM's and then build again?
If I do this, will the build script import the database dumps it has already made?
 
Please post the output of:
Code:
ls -l /usr/local/directadmin/custombuild/mysql
 
-rw-r--r-- 1 root root 6562059 Apr 28 22:54 MySQL-client-5.0.81-0.i386.rpm
-rw-r--r-- 1 root root 3738208 Apr 28 22:56 MySQL-devel-5.0.81-0.i386.rpm
-rw-r--r-- 1 root root 20075473 Apr 28 22:57 MySQL-server-5.0.81-0.i386.rpm
-rw-r--r-- 1 root root 1780510 Apr 28 22:57 MySQL-shared-5.0.81-0.i386.rpm
 
Code:
ps aux | grep mysql
Check if there is something running from MySQL?
If, try to kill it or try first
Code:
/etc/init.d/mysqld stop
After that try
Code:
./build mysql
* to be sure I should enable 'mysqlbackup=yes' in options.conf *
 
The server is being stopped after the databases are dumped.
./build mysql
Dumping database da_roundcube
Dumping database mysql
Dumping database test
Found /usr/local/directadmin/custombuild/mysql/MySQL-client-5.0.81-0.i386.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-devel-5.0.81-0.i386.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-server-5.0.81-0.i386.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.0.81-0.i386.rpm
Stopping mysqld ...
Killing mysqld with pid 22388
Wait for mysqld to exit. done

Updating MySQL 5.0.81 to 5.0.81 <---- Is this correct???

warning: MySQL-client-5.0.81-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-shared ########################################### [ 25%]
2:MySQL-client ########################################### [ 50%]
3:MySQL-devel ########################################### [ 75%]

error: %pre(MySQL-server-5.0.81-0) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping MySQL-server-5.0.81-0
Giving mysqld a few seconds to start up...
--------------------------------------------------------

MySql needs to be running to do the Database dump.
I have edited the output to remove the 30 or so other database dump lines, plus the mysql warning that the upgrade from 4 to 5 must be done manually.

I have also performed this update on two other DA servers without any problems.
 
Last edited:
Do the following to fix the problem:
Code:
rpm -e MySQL-server-4.0.23-0 --nodeps
cd /usr/local/directadmin/custombuild
./build update
./build mysql
 
Do the following to fix the problem:
Code:
rpm -e MySQL-server-4.0.23-0 --nodeps
cd /usr/local/directadmin/custombuild
./build update
./build mysql

Will the existing database dumps be imported by the script, or will I have to manually import and then run the fix tables script?
 
Do the following to fix the problem:
Code:
rpm -e MySQL-server-4.0.23-0 --nodeps
cd /usr/local/directadmin/custombuild
./build update
./build mysql

I had to do a rpm -e MySQL-server-4.0.23-0 --nodeps --noscripts

as it kept failing on the {pre} script.

Apart from that, upgrade was (finally) painless .. many thanks for your help
 
Back
Top