Skip to content

Instantly share code, notes, and snippets.

@mindreframer
Created December 15, 2010 14:29
Show Gist options
  • Save mindreframer/742002 to your computer and use it in GitHub Desktop.
Save mindreframer/742002 to your computer and use it in GitHub Desktop.
update to percona 5.1.52-12.3-159 for ubuntu 10.04/8.04
##### move your default mysql datadir and initialize a fresh db:
mkdir /tmp/percona
cd /tmp/percona
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/lucid/x86_64/libmysqlclient-dev_5.1.52-12.3-159.lucid_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/lucid/x86_64/libmysqlclient16_5.1.52-12.3-159.lucid_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/lucid/x86_64/percona-server-client_5.1.52-12.3-159.lucid_all.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/lucid/x86_64/percona-server-client-5.1_5.1.52-12.3-159.lucid_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/lucid/x86_64/percona-server-common_5.1.52-12.3-159.lucid_all.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/lucid/x86_64/percona-server-server-5.1_5.1.52-12.3-159.lucid_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/lucid/x86_64/percona-server-server_5.1.52-12.3-159.lucid_all.deb
dpkg -i libmysqlclient-dev_5.1.52-12.3-159.lucid_amd64.deb
dpkg -i libmysqlclient16_5.1.52-12.3-159.lucid_amd64.deb
dpkg -i percona-server-client_5.1.52-12.3-159.lucid_all.deb
dpkg -i percona-server-client-5.1_5.1.52-12.3-159.lucid_amd64.deb
dpkg -i percona-server-common_5.1.52-12.3-159.lucid_all.deb
dpkg -i percona-server-server-5.1_5.1.52-12.3-159.lucid_amd64.deb
dpkg -i percona-server-server_5.1.52-12.3-159.lucid_all.deb
#### the server package was not installed properly...
chown -R mysql.mysql /var/lib/mysql
/etc/init.d/mysql start
# now in mysql:
##### debian pass: cat /etc/mysql/debian.cnf |grep pass| tail -n 1|awk '{print $3}'
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'YOUR_DEBIAN_MAINT_PASS' WITH GRANT OPTION;
## !!! prepare second console...
dpkg -i percona-server-server-5.1_5.1.52-12.3-159.lucid_amd64.deb
### while the package is installed in the other console, execute repeatedly:
chown -R mysql.mysql /var/lib/mysql
## if you're lucky, this worked!
mkdir /tmp/percona
cd /tmp/percona
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/hardy/x86_64/libmysqlclient16_5.1.52-12.3-159.hardy_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/hardy/x86_64/libmysqlclient-dev_5.1.52-12.3-159.hardy_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/hardy/x86_64/percona-server-client_5.1.52-12.3-159.hardy_all.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/hardy/x86_64/percona-server-client-5.1_5.1.52-12.3-159.hardy_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/hardy/x86_64/percona-server-common_5.1.52-12.3-159.hardy_all.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/hardy/x86_64/percona-server-server-5.1_5.1.52-12.3-159.hardy_amd64.deb
wget http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/hardy/x86_64/percona-server-server_5.1.52-12.3-159.hardy_all.deb
dpkg -i libmysqlclient16_5.1.52-12.3-159.hardy_amd64.deb
dpkg -i libmysqlclient-dev_5.1.52-12.3-159.hardy_amd64.deb
dpkg -i percona-server-client_5.1.52-12.3-159.hardy_all.deb
dpkg -i percona-server-client-5.1_5.1.52-12.3-159.hardy_amd64.deb
dpkg -i percona-server-common_5.1.52-12.3-159.hardy_all.deb
dpkg -i percona-server-server-5.1_5.1.52-12.3-159.hardy_amd64.deb
dpkg -i percona-server-server_5.1.52-12.3-159.hardy_all.deb
chown -R mysql.mysql /var/lib/mysql
#!/usr/bin/env ruby
#
# percona_update.rb
# little percona update script for ubuntu
#
#
distribution = 'lucid' # hardy
url = "http://www.percona.com/downloads/Percona-Server-5.1/Percona-Server-5.1.52-12.3/deb/#{distribution}/x86_64"
## order important!
files = %W(
libmysqlclient16_5.1.52-12.3-159.#{distribution}_amd64.deb
libmysqlclient-dev_5.1.52-12.3-159.#{distribution}_amd64.deb
percona-server-client_5.1.52-12.3-159.#{distribution}_all.deb
percona-server-client-5.1_5.1.52-12.3-159.#{distribution}_amd64.deb
percona-server-common_5.1.52-12.3-159.#{distribution}_all.deb
percona-server-server-5.1_5.1.52-12.3-159.#{distribution}_amd64.deb
percona-server-server_5.1.52-12.3-159.#{distribution}_all.deb
)
file_urls = files.map{|x| "#{url}/#{x}"}
puts "mkdir /tmp/percona
cd /tmp/percona
"
file_urls.each do |f|
puts "wget #{f}"
# `wget #{f} `
end
files.each do |f|
puts "dpkg -i #{f}"
end
#rm -rf /var/lib/mysql
#mysql_install_db
puts "chown -R mysql.mysql /var/lib/mysql"
debian_maint_pass = `cat /etc/mysql/debian.cnf |grep pass| tail -n 1|awk '{print $3}'`.strip
puts "now in mysql: "
#puts "GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '#{debian_maint_pass}' WITH GRANT OPTION;"
=begin
open 2 consoles to server:
in console 1:
dpkg -i percona-server-server-5.1_5.1.52-12.3-159.lucid_amd64.deb
in console 2: repeat again and again, while the package is installing...
chown -R mysql.mysql /var/lib/mysql
http://repo.percona.com/apt/dists/lucid/main/binary-amd64/Packages
### handler socket:
http://ronaldbradford.com/blog/mysql-handlersocket-under-ubuntu-2010-11-05/
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment