Upgrade MySQL on Debian Lenny (Mercury)
I think this is what I'd add to my sources.list file:
deb
deb
deb-src
I've updated on another Lenny site, but it isn't using Mercury, so I don't want to toast my new installation.
9 Replies
% apt-cache policy mysql-common
mysql-common:
Installed: 5.1.49-3~bpo50+1
Candidate: 5.1.49-3~bpo50+1
Version table:
5.1.54-1 0
200 http://ftp.us.debian.org experimental/main Packages
5.1.49-3 0
500 http://ftp.us.debian.org squeeze/main Packages
500 http://ftp.us.debian.org sid/main Packages
*** 5.1.49-3~bpo50+1 0
990 http://backports.debian.org lenny-backports/main Packages
100 /var/lib/dpkg/status
5.0.51a-24+lenny4 0
990 http://ftp.us.debian.org lenny/main Packages
990 http://security.debian.org lenny/updates/main Packages
Here's part of /etc/apt/sources.list:
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free
deb-src http://backports.debian.org/debian-backports lenny-backports main contrib non-free
And part of /etc/apt/preferences:
% cat /etc/apt/preferences
Package: *
Pin: release a=lenny-backports
Pin-Priority: 990
Package: *
Pin: release n=lenny
Pin-Priority: 900
Also, 5.0 and 5.1 are separate branches, different Debian packages.
You can easily install it explicitly, tho.
i'm dealing with a new site and new drupal database right now. so toasting the db and recreating isn't the end of the world.
@theatereleven:
but is this separate branch okay to use with Pressflow you think? if i load up a new version of mysql and it breaks something, can i just remove and go back to the original version?
i'm dealing with a new site and new drupal database right now. so toasting the db and recreating isn't the end of the world.
Yes (I use 5.1 with drupal), and yes, just make sure you back up anything important, and run mysql_upgrade.
mysql_upgrade? someone else told me to do apt-get upgrade. not arguing…just new. what is the best route to take? also, are there post upgrade tasks that need to be done to the db or anything?
thanks man.
@theatereleven:
mysql_upgrade? someone else told me to do apt-get upgrade. not arguing…just new. what is the best route to take? also, are there post upgrade tasks that need to be done to the db or anything?
Once you've added the backport lines to your sources.list, do aptitude update, then just run aptitude. Use aptitude's ncurses interface to find the mysql package. For that package, you will see each version APT knows about. Highlight the version you want to install and press +. If there are any dependency problems when you do this, you can press e to examine them, look at possible solutions, and select a solution to apply. Finally, press g to preview the changes, and g again to start the installs and upgrades.
1) Edit your sources list in Debian to allow pulling from the Debian backports repository:
nano /etc/apt/sources.list
add the line:
deb
save the file
2) Get available updates:
apt-get update
3) Upgrade MySQL (no need to stop the server)
apt-get -t lenny-backports install mysql-server-5.1
*the first parts of the command are always used to pull a package. You can then retrieve a package's name from:
4) Add the package information so you get updates:
nano /etc/apt/preferences
Add:
Package: *
Pin: release a=lenny-backports
Pin-Priority: 200
And there you go….hope that helps!