Ubuntu 8.04 LTS(hardy)にMySQL5.1をinstallする
はじめに
MySQLのパーティショニングとかQ4Mなどを試してみようと、Ubuntu 8.04 LTS(hardy)のMySQLのバージョンを確認したら、
mysql-server-5.0(5.0.51a-3ubuntu5.5)
MySQLのマニュアルには5.1からの新機能とのことなのでバージョンをあげたいけれども、Ubuntuのパッケージを見ても無いっぽいので、いろいろやってみるテスト。
手順
本家にはない!こういう残念なときには、世界中のハカーにお願いするのが常識。LaunchpadのPersonal Package Archive(以下、PPA)にお世話になってみる。Ubuntu8.10で試している人がいるので、8.04でも動くだろうと思って試してみる。
1. /etc/apt/sources.list に以下を追記
deb http://ppa.launchpad.net/monty/ubuntu gutsy main universe restricted multiverse deb http://ppa.launchpad.net/smurf/ubuntu gutsy main universe restricted multiverse
2. パッケージ情報更新
ubuntu% sudo apt-get update ubuntu% sudo apt-cache show mysql-server-5.1 Package: mysql-server-5.1 Priority: optional Section: misc Installed-Size: 54168 Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org> Architecture: i386 Version: 5.1.22rc-2~ppa5 (以下略)
入っているっぽい!「This package includes the server and ndb-cluster binaries.」と書いてあるのでndbも今度試さなきゃ。
3. UpgradeとInstall
ubuntu% sudo apt-get upgrade ubuntu% sudo apt-get install mysql-server-5.1
300個以上のパッケージのUpgrade。
1時間半ぐらいかかって mysqlのrootのパスワードの再設定を行って(といっても空にしたけど)インストール終了(`・ω・´)キリ!
ubuntu% mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.1.22-rc-Debian_2~ppa5-log Debian lenny distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>