1、安装
tar -zxf cmake-2.8.3.tar.gz
cd cmake-2.8.3
./configure
make
make install
cd ..
/usr/sbin/groupadd mysql
/usr/sbin/useradd -r -g mysql mysql
tar -zxvf mysql-5.5.11.tar.gz
cd mysql-5.5.11
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.5.11 .
make
make install
cd /usr/local/mysql-5.5.11/
chown -R mysql .
chgrp -R mysql .
#scripts/mysql_install_db --user=mysql
/usr/local/mysql-5.5.11/scripts/mysql_install_db --basedir=/usr/local/mysql-5.5.11 --datadir=数据库存放数据的目录 --user=mysql
2、初始化
## 编辑/etc/mysql/master/my_***.cnf文件,注意修改ip、端口和innodb关联路径
## 如果不用innodb,可以注释掉innodb相关配置
mkdir -p /data/mysql_***_data/innodb
chown -R mysql.mysql /data/mysql_***_data
cd /usr/local/mysql-5.5.11/
## 初始化数据库
/usr/local/mysql/scripts/mysql_install_db --datadir=/data/mysql_***_data --user=mysql
##报错##
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
##解决##
/usr/local/mysql-5.5.11/scripts/mysql_install_db --basedir=/usr/local/mysql-5.5.11 --datadir=数据库存放数据路径 --user=mysql
阅读(1095) | 评论(0) | 转发(0) |