The hard drive of my OS died so I had to do a sudden Kubuntu 9.10 to Kubuntu 11.04 upgrade. The OS is actually a fresh install, but the personal data and mysql data were on a different drive, so they were safe.

I am now running the latest mysql 5.1 version of the server. And I look at my mysql data that I still have to import and wonder: where they 5.0 data or 5.1 data? Do I need to do the 5.0 to 5.1 upgrade or not?

https://wiki.ubuntu.com/KarmicKoala/ReleaseNotes#MySQL_upgrade
Quoting the above page:

In Ubuntu 9.10 MySQL 5.1 has been promoted as the default MySQL server. MySQL 5.0 is still available from the universe repository though. Performing an upgrade via update-manager will correctly handle the transition from MySQL 5.0 to MySQL 5.1. However using a dist-upgrade will not: mysql-server-5.0 will be upgraded instead of being replaced by mysql-server-5.1. If MySQL 5.0 needs to be kept the mysql-server and mysql-client packages should be removed before the upgrade is started.

I completely forgot how I performed the upgrade to Kubuntu 9.10 from the previous release, so, reading the above, I am not sure whether my data was properly upgraded or not to 5.1.

How can I tell? What's the difference between the two versions (as far as the data is concerned)?

link|improve this question

1  
Could you please show us all the files you have in data dir? (append to your post) – quanta Aug 29 '11 at 5:52
1  
Why does it matter? Why not just install the newest version and perform the upgrade? – Zoredache Aug 29 '11 at 6:04
@quanta: thanks. See my own answer. – augustin Aug 29 '11 at 6:16
@Zoredache: thanks. I was not sure we could do so on already migrated data, but following your suggestion, I did so anyway. See my answer. – augustin Aug 29 '11 at 7:19
1  
"The hard drive of my OS died so I had to...upgrade". erm no. Even if you didn't have a full OS backup rather than just a data backup, there's no obvious requirement to upgrade, the installation media for the old version continues to be available - and that avoids the whole issue about data compatability. Certainly upgrading regularly is a good idea, but not at the same time you recover from an outage. – symcbean Aug 29 '11 at 11:40
show 1 more comment
feedback

1 Answer

up vote 0 down vote accepted

I had problems configuring mysql because of a non-standard data dir. Apparently, it was a problem with apparmor, which is now solved: I had to add the data dir path to the list of authorized paths for mysql within the apparmor config file.

In the data dir, I found the following files which indicates that the data was probably mysql 5.1 compatible:

# cat debian-5.0.flag.old 
# cat debian-5.1.flag 
# cat mysql_upgrade_info.old 
5.0.51a

Most importantly, mysql and phpmyadmin seem to work perfectly, now, and I can browse all the data. I have a backup of the whole datadir just in case.

Also, as suggested in the comments, I performed the upgrade anyway: it didn't harm anything and I found a bunch of tables that needed to be repaired:

# mysql_upgrade -p

Thank you to the people who commented, trying to help. :)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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