Monday, December 27, 2010

Upgrade Mysql 5.5.7 to 5.5.8 from SOURCE

After I tested to install MySQL 5.5.8 from source. I have upgraded MySQL 5.5.7(installed from source) to 5.5.8
mysql> select version();
+--------------+
| version() |
+--------------+
| 5.5.7-rc-log |
+--------------+
My Install Prefix = /usr/local/MySQL-5.5
My Data Dir = /usr/local/MySQL-5.5/var
My Configuration Dir = /etc

So, I use some options.
# mkdir build
# cd build
# cmake ../mysql-5.5.8 -DCMAKE_INSTALL_PREFIX="/usr/local/MySQL-5.5" -DMYSQL_DATADIR="/usr/local/MySQL-5.5/var" -DSYSCONFDIR="/etc"
# make
# /usr/local/MySQL-5.5/bin/mysqladmin shutdown
# make install
start MySQL, but Error!!!
# /usr/local/MySQL-5.5/bin/mysqld_safe --user=mysql &
101227 12:47:02 mysqld_safe Logging to '/usr/local/MySQL-5.5/data/oratest.surachartopun.com.err'.
101227 12:47:02 mysqld_safe Starting mysqld daemon with databases from /usr/local/MySQL-5.5/data
101227 12:47:02 mysqld_safe mysqld from pid file /usr/local/MySQL-5.5/data/oratest.surachartopun.com.pid ended
Something wrong "/usr/local/MySQL-5.5/data" PATH, It should be "/usr/local/MySQL-5.5/var"
then Modify /usr/local/MySQL-5.5/bin/mysqld_safe file:
# Try where the binary installs put it
if test -d $MY_BASEDIR_VERSION/data/mysql
then
DATADIR=$MY_BASEDIR_VERSION/data
-- To
# Try where the binary installs put it
if test -d $MY_BASEDIR_VERSION/var/mysql
then
DATADIR=$MY_BASEDIR_VERSION/var
and start again.
# /usr/local/MySQL-5.5/bin/mysqld_safe --user=mysql &
101227 12:49:21 mysqld_safe Logging to '/usr/local/MySQL-5.5/var/oratest.surachartopun.com.err'.
101227 12:49:21 mysqld_safe Starting mysqld daemon with databases from /usr/local/MySQL-5.5/var
Check version and data !!!
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.5.8-log |
+-----------+
Everything OK :)

No comments: