Help - Search - Members - Calendar
Full Version: How to upgrade mysql to 4.0x
The Planet Forums > Control Panels > Ensim > Ensim HOWTOs
skillarchy
Upgrading your mysql on redhat running ensim 4.0.3

****Please note: Use this how to at your own risk, myself or credited person/persons of this
how to is not liable in anyway at all for any damage. I upgraded mine this way and its
working like a charm.

1) login to your box as root ( if you do not have direct root login use su -)

First lets back up current mysql database.

mysqldump -A -Q -c -e --master-data=2 -p > all_databases.sql


2) #make directory to download file to
mkdir mysql4.0.26

3) #Move to the directory you have just created
cd mysql4.0.26

4) #Download the rpm file you will need
wget http://mysql.secsup.org/Downloads/MySQL-4....0.26-0.i386.rpm
wget http://mysql.secsup.org/Downloads/MySQL-4....0.26-0.i386.rpm
wget http://mysql.secsup.org/Downloads/MySQL-4....0.26-0.i386.rpm
wget http://mysql.secsup.org/Downloads/MySQL-4....0.26-0.i386.rpm

5)#You will now need to execute the rpms
rpm -Uvh MySQL*.rpm

***Note: You might get this message and you can safely ignore it
warning: MySQL-client-4.0.26-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5

Also you will see some very important message after upgrade pay carefull attention to them
example:NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run the
/usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

#Run this command to fix privilege
/usr/bin/ensim-python /usr/lib/opcenter/mysql/updatemysql_db.pyc


***Note: You will also need to know your mysql root password

6) #Execute the following commands
# set_pre_maintenance

# set_maintenance

# set_post_maintenance

# service webppliance restart

***Note: if ensim goes through maintainance successfully, then restart mysql
# service mysql restart



***Note: There are chances that ensim doesn't go through maintainance properly here is a
few troubleshoot for that. What you will need to do will depend on error you return.


a) Check your ensim log for error log file name is ensim_appliance.log
located in /var/log/ensim_appliance ( you can use the tail command to see the last few lines)

b) In the case error is about '/home/virtual/FILESYSTEMTEMPLATE/siteinfo/bin/bash'
you can safely execute # rm -rf '/home/virtual/FILESYSTEMTEMPLATE/siteinfo/bin/bash'
or any file error reporting in you log.
C) Now restart webppliance # service webppliance restart

now ensim should be going through the maintainance and and you should be ok.


D) Worst case you will need to reboot the box and repeat number 6

E) If you restart box and repeat number 6 and webppliance still wont exit successfully
check you log again and remove any file it complain about and restart webppliance again.
F) After removing file complained about in error log webppliance should exit successfully.

G) Now go ahead and restart mysql by executing # service mysql restart
***Note: mysqld has been change to mysql



All credit goes to Kamihacker, who guided me through the steps, i am please to pass it on to
everyone else.



By: cornflict aka skillarchy
Ahdonline
Thanks a lot for the how to. Just a few notes on my upgrade on one box i tested it on.

the line
mysqldump -A -Q -c -e --master-data=2 -p > all_databases.sql
gave me error I used
mysqldump -A -Q -c -e --master-data -p > all_databases.sql
minus =2

And after it was complete i got the permissions error, and i ran the python command but had not restarted mysql so before you run the
#Run this command to fix privilege
/usr/bin/ensim-python /usr/lib/opcenter/mysql/updatemysql_db.pyc

you may have to issue a
service mysql restart


Thanks again
Ahdonline
Also as a side note. If you have SIM installed you will want to rerun the auto configure so it recognizes the change from mysqld to mysql

/usr/local/sim/
./autoconf

You should be able to just select the defaults. it will autofind the sql change.
skillarchy
Thanks for adding those notes AHdonline.
jnmunsey
ok what about the upgrade to 4.1.16?

There are now RHEL3 RPMs and then the basic ones as well, but no MySQL-shared-compat RPM for RHEL3, just the basic one.

Which ones do we use? Should we upgrade to 4.1.16?
devicemedia
Thank you to skillarchy for this guide and Ahdonline for the added input. I have 59 sites on this server I upgraded so I was extremely nervous about this. I backed up data, binaries and anything else i could before trying it, but it worked like a charm and I didn't need any of my backups.

Thank you for your help!

Now all I need is a guide for upgrading php!
skillarchy
Wow i remember this how to. Back then when EV1 use to rock!
hmignon
Dear,

I have upgraded folowing the upgrade and it is working. Now I want to upgrade to 4.1 and getteing:

MySQL-client-standard-4.1.22-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
file /usr/lib/libmysqlclient.so from install of MySQL-shared-standard-4.1.22-0.rhel4 conflicts with file from package MySQL-shared-compat-4.0.26-0
file /usr/lib/libmysqlclient_r.so from install of MySQL-shared-standard-4.1.22-0.rhel4 conflicts with file from package MySQL-shared-compat-4.0.26-0

Can someone tell me what I am doing wrong ?

Rgds,

Hans
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.