View Full Version : error upgrading mysql to 5.0
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?
smtalk
05-08-2009, 01:17 AM
Please post the output of:
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
smtalk
05-08-2009, 01:41 AM
And:
rpm -qa | grep MySQL
rpm -qa | grep MySQL
MySQL-shared-5.0.81-0
MySQL-client-5.0.81-0
MySQL-server-4.0.23-0
MySQL-devel-5.0.81-0
daveyw
05-08-2009, 02:05 AM
ps aux | grep mysqlCheck if there is something running from MySQL?
If, try to kill it or try first
/etc/init.d/mysqld stop
After that try
./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.
smtalk
05-08-2009, 02:49 AM
Do the following to fix the problem:
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:
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?
smtalk
05-08-2009, 05:40 AM
Everything will be done by the CustomBuild script.
Do the following to fix the problem:
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
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.