Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to upgrade mysql 5.0 to mysql 5.1. Do i need to carry out anymore steps then these.

I will log into the server and do rpm -Uvh MySQL-server-community-5.1.63-1.rhel5.x86_64

the earlier version of mysql was installed using yum install .

Is this the correct approach ? After installing do i need to upgrade the indvidual database themselves if so how ?

regards

share|improve this question

2 Answers 2

up vote 5 down vote accepted

As usual before such operations, back up your databases. You can use:

mysqldump --add-drop-database --all-databases

Your approach should be sufficient, but if not, you'll be able to restore everything in a clean way.

Edit: and you can refer to the MySQL documentation on the subject.

share|improve this answer
    
Can you please let me know sir what does the command mysqldump --add-drop-database --all-databases do ? And why is that your asking me to execute the command yes i have taken a backup of the database –  jhon.smith Jul 7 '12 at 13:35
    
You can of course refer to its manpage. It outputs a long file that contains a dump of all databases in SQL. It will not drop databases, just include DROP commands in the dump, in case you restore. A common way to use it would be with something like mysqldump --add-drop-database --all-databases | gzip -1 > /var/lib/mysqldump.gz. –  Pierre Carrier Jul 7 '12 at 13:50
    
Pierre Thanks a ton for coming to my rescue –  jhon.smith Jul 7 '12 at 14:09

A backup is prudent, but it's not necessary to restore a full dump to upgrade between 5.0 and 5.1. Just run mysql_upgrade from the shell after you upgrade the binaries and restart MySQL.

Note you should read the MySQL manual on upgrading: Upgrading MySQL

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.