User:SwifT/Wikified but not merged documents/MySQL upgrade slotted

From Gentoo Wiki
Jump to: navigation, search

This document describes how to go back to an unslotted MySQL.

Upgrading to an unslotted MySQL version from a slotted one

Introduction

Due to the negative response from our user base, the MySQL team has decided to go back to unslotted MySQL. In other words, installing different versions of MySQL on the same system is not supported anymore.

If you had upgraded to the slotted version, this guide should help you upgrade to the unslotted version.


"Unslotting"

The following script should do most of the work:


Code"Unslotting" script

echo " building an unslotted copy of mysql "
emerge --buildpkgonly '=dev-db/mysql-5.0.18-r60'

echo " stopping the server  "
/etc/init.d/mysql stop

echo " removing most of symlinks "
eselect mysql remove

echo " config files "
mv /etc/mysql /etc/mysql.old
mv /etc/mysql-500 /etc/mysql

echo " removal of remaining symlinks, and eselect stuff "
rm /usr/lib/mysql /usr/include/mysql /usr/bin/mysql_config /usr/lib/libmysql*
rm -rf /var/lib/eselect/mysql/ /usr/lib/mysql-[45]0[01]

echo " unmerge slotted mysql "
emerge -C \
=dev-db/mysql-4.0.26-r30 \
=dev-db/mysql-4.1.15-r30 \
=dev-db/mysql-4.1.16-r30 \
=dev-db/mysql-4.1.18-r30 \
=dev-db/mysql-5.0.15-r30 \
=dev-db/mysql-5.0.16-r30 \
=dev-db/mysql-5.0.17-r30 \
=dev-db/mysql-5.0.18-r30 \
=dev-db/mysql-5.1.3_alpha-r30 \
=dev-db/mysql-5.1.4_alpha-r30 \
=dev-db/mysql-5.1.6_alpha-r30 \
app-admin/eselect-mysql

echo " ready to merge again MySQL "
emerge --usepkgonly '=dev-db/mysql-5.0.18-r60'

This is a deprecated template. Help us update this template!

It is also recommended that you move data directories listed in /etc/mysql/my.cnf . If you do that, don't forget to edit /etc/mysql/my.cnf as well.


Acknowledgements

We would like to thank the following authors and editors for their contributions to this guide:

  • Francesco Riosa
  • Xavier Neys