腾讯视频/爱奇艺/优酷/外卖 充值4折起
centos下编译mysql5.6.16
一,下载
wget http://dev.mysql.com/get/downloads/mysql-5.6/mysql-5.6.16.tar.gz
tar -zxvf mysql-5.6.16.tar.gz
cd mysql-5.6.16
二,编译
cmake
-dcmake_install_prefix=/data/apps/mysql5.6.16
-dmysql_datadir=/data/mysqldata
-dsysconfdir=/etc -dwith_myisam_storage_engine=1
-dwith_innobase_storage_engine=1
-dwith_memory_storage_engine=1
-dwith_readline=1
-dmysql_unix_addr=/tmp/mysql.sock
-dmysql_tcp_port=3306
-denabled_local_infile=1
-dwith_partition_storage_engine=1
-dextra_charsets=all
-ddefault_charset=utf8
-ddefault_collation=utf8_general_ci
make && make install
三,配置&&初始化
cp ./support-files/my-default.cnf /etc/my.cnf
groupadd mysql
useradd -g mysql mysql
chown -r mysql:mysql /data/apps/mysql5.6.16
/data/apps/mysql5.6.16/scripts/mysql_install_db --user=mysql --basedir=/data/apps/mysql5.6.16 --datadir=/data/mysqldata
/data/apps/mysql5.6.16/bin/mysqld_safe --user=mysql &
/data/apps/mysql5.6.16/bin/mysqladmin -uroot password mypassword
四,加入到系统服务
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 700 /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on