mysql> select version();My Install Prefix = /usr/local/MySQL-5.5
+--------------+
| version() |
+--------------+
| 5.5.7-rc-log |
+--------------+
My Data Dir = /usr/local/MySQL-5.5/var
My Configuration Dir = /etc
So, I use some options.
# mkdir buildstart MySQL, but Error!!!
# 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
# /usr/local/MySQL-5.5/bin/mysqld_safe --user=mysql &Something wrong "/usr/local/MySQL-5.5/data" PATH, It should be "/usr/local/MySQL-5.5/var"
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
then Modify /usr/local/MySQL-5.5/bin/mysqld_safe file:
# Try where the binary installs put it-- To
if test -d $MY_BASEDIR_VERSION/data/mysql
then
DATADIR=$MY_BASEDIR_VERSION/data
# Try where the binary installs put itand start again.
if test -d $MY_BASEDIR_VERSION/var/mysql
then
DATADIR=$MY_BASEDIR_VERSION/var
# /usr/local/MySQL-5.5/bin/mysqld_safe --user=mysql &Check version and data !!!
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
mysql> select version();Everything OK :)
+-----------+
| version() |
+-----------+
| 5.5.8-log |
+-----------+
No comments:
Post a Comment