日期:2014-05-16 浏览次数:20862 次
# wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz # tar zxvf cmake-2.8.4.tar.gz # cd cmake-2.8.4 # ./configure # make # make install
# mkdir /opt/mysql # mkdir /data/mysql/data
# groupadd mysql # useradd -g mysql mysql
# chown mysql:mysql -R /data/mysql/data
# tar zxvf mysql-5.5.13.tar.gz # cd mysql-5.5.13
cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql -DSYSCONFDIR=/opt/mysql/etc -DMYSQL_DATADIR=/data/mysql/data -DMYSQL_TCP_PORT=3306 -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DMYSQL_USER=mysql -DEXTRA_CHARSETS=all -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=1 -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITHOUT_PARTITION_STORAGE_ENGINE=1
# yum install ncurses-devel
# rm -fr CMakeCache.txt
# make # make install
# mkdir /opt/mysql/log # mkdir /opt/mysql/etc # cp support-files/my-medium.cnf /opt/mysql/etc/my.cnf
# chmod 755 scripts/mysql_install_db # scripts/mysql_install_db --user=mysql --basedir=/opt/mysql/ --datadir=/data/mysql/data/
# mkdir /opt/mysql/init.d # cp support-files/mysql.server /opt/mysql/init.d/mysql
# chmod +x /opt/mysql/init.d/mysql
# /opt/mysql/init.d/mysql start
rm -fr /data/mysql/data mkdir /data/mysql/data
chmod 755 scripts/mysql_install_db scripts/mysql_install_db --user=mysql --basedir=/opt/mysql/ --datadir=/data/mysql/data/ //授权 chmod +x /opt/mysql/init.d/mysql //启动 /opt/mysql/init.d/mysql start
/mysql-bin.index' not found (Errcode: 13