Difference between revisions of "Mysql"

From Atomicorp Wiki
Jump to: navigation, search
(Installation)
(Installation)
Line 7: Line 7:
 
== Installation ==
 
== Installation ==
  
To Upgrade to Mysql 5.1 on CentOS/RHEL/Fedora  
+
To Upgrade to Mysql 5.1 on CentOS/RHEL/Fedora
''Steps 3 and 4 only apply if you are upgrading from MySQL 5.0.x'' [http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-previous-series.html]
+
 
 +
'''Steps 3 and 4 only apply if you are upgrading from MySQL 5.0.x See version differences in following link''' [http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-previous-series.html]
  
 
Step 1) Set up the atomic channel:  
 
Step 1) Set up the atomic channel:  
Line 18: Line 19:
 
  yum upgrade mysql
 
  yum upgrade mysql
  
Step 3) MySQL 5.1 removed the BERKLEY storage engine. As such, many /etc/my.cnf have the following line to disable it. You MUST comment out or remove this or MySQL 5.1 '''will not start!'''
+
Step 3) MySQL 5.1 removed the BERKLEY storage engine. As such, many /etc/my.cnf have the following line inside. You '''must''' comment out or remove this or MySQL 5.1 '''will not start!'''
  
 
  skip-bdb
 
  skip-bdb

Revision as of 08:04, 29 June 2010

Contents

Features

  • Based on Mysql 5.1.x branch
  • Uses the design from Fedora, RHEL, and CentOS


Installation

To Upgrade to Mysql 5.1 on CentOS/RHEL/Fedora

Steps 3 and 4 only apply if you are upgrading from MySQL 5.0.x See version differences in following link [1]

Step 1) Set up the atomic channel:

wget -q -O - http://www.atomicorp.com/installers/atomic | sh

Step 2) Upgrade to Mysql 5.1

yum upgrade mysql

Step 3) MySQL 5.1 removed the BERKLEY storage engine. As such, many /etc/my.cnf have the following line inside. You must comment out or remove this or MySQL 5.1 will not start!

skip-bdb

Step 4) Update your MySQL tables

mysql_upgrade -u root -p

or for Plesk environments (NOTE - this is the exact same login as the Plesk superuser):

mysql_upgrade -u admin -p

Step 5) Restart mysql

/etc/init.d/mysqld restart

Support Packages

Mysqltuner, an excellent tool for investigating performance issues with mysql

 yum install mysqltuner

Known Issues

Problems with MySQL databases and PLESK 9 after upgrade

If you get the following error after upgrading when you try to log into PLESK then you need to upgrade your database tables:

ERROR: PleskFatalException
bad column in table: `backup_time` time NOT NULL default '00:00:00',
[...]


Issue the following command from the shell:

mysqlcheck --check-upgrade --all-databases --auto-repair -uadmin -pyouradminpassword

followed by:

cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql --no-defaults --force --user=admin --password=youradminpassword --host=localhost --database=mysql

This script updates all the mysql privilege tables to be usable by the current version of MySQL.

References:

[2] http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html

[3] http://forum.parallels.com/pda/index.php/t-85461.html

Personal tools