标签:chown bundle my.cnf without 配置 编译安装 efi oba ssl
解压软件
[root@DB01 tools]# tar -xf mysql-5.6.36.tar.gz
配置MySQL
cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.6.36 \
-DMYSQL_DATADIR=/application/mysql-5.6.36/data \
-DMYSQL_UNIX_ADDR=/application/mysql-5.6.36/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITH_ZLIB=bundled \
-DWITH_SSL=bundled \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_EMBEDDED_SERVER=1 \
-DENABLE_DOWNLOADS=1 \
-DWITH_DEBUG=0
cp support-files/my*.cnf /etc/my.cnf
8 . 初始化数据库
/application/mysql/scripts/mysql_install_db --basedir=/application/mysql/ --datadir=/application/mysql/data --user=mysql
9.创建关键目录并授权
mkdir /application/mysql/tmp/
chown -R mysql.mysql /application/mysql/
10 . 拷贝启动脚本
cp support-files/mysql.server/etc/init.d/mysqld
chmod700 /etc/init.d/mysqld
11 . 设置开机自启
chkconfig mysqld on
chkconfig--list mysqld
12 .启动数据库
/etc/init.d/mysqld start
netstat -lntup|grep 3306
13 .设置环境变量
echo ‘PATH=/application/mysql/bin/:$PATH‘ >>/etc/profile
source /etc/profile
echo $PATH
标签:chown bundle my.cnf without 配置 编译安装 efi oba ssl
原文地址:http://blog.51cto.com/13268236/2341124