mysql安装
软件版本 MySQL-5.6.32 (文中涉及到的软件包加最下方微信免费获取)
上传mysql-5.6.32-linux-glibc2.5-x86_64.tar.gz到APP服务器目录:/usr/local/src (软件包见附件)
#cd /usr/local/src
#tar -zxvf mysql-5.6.32-linux-glibc2.5-x86_64.tar.gz
#mv mysql-5.6.32-linux-glibc2.5-x86_64 /usr/local/mysql
#groupadd mysql
#useradd -g mysql mysql
#cd /usr/local/mysql
#mkdir /usr/local/mysql/data/tmp
#chown -R mysql:mysql /usr/local/mysql/data
#./scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql
#vim /etc/my.cnf //复制以下内容
[mysqld]
datadir=/usr/local/mysql/data
socket=/usr/local/mysql/data/mysql.sock
character_set_server=gbk
user=mysql
default-storage-engine=INNODB
tmpdir=/usr/local/mysql/data/tmp
symbolic-links=0
innodb_buffer_pool_size = 1G
skip-name-resolve
event_scheduler = 1
port = 3306
server_id = 1
wait_timeout=2880000
interactive_timeout = 2880000
max_allowed_packet = 512M
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
lower_case_table_names = 1
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqldump]
quick
max_allowed_packet = 512M
[client]
default-character-set=gbk
socket=/usr/local/mysql/data/mysql.sock
#cp support-files/mysql.server /etc/init.d/mysqld
#chmod 755 /etc/init.d/mysqld
#vim /etc/init.d/mysqld //文件开头添加如下内容
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
#chkconfig --add mysqld //添加mysql为系统服务
#chkconfig mysqld on //设置mysql开机自启动
#service mysqld start //启动mysql
如果对此有兴趣,请扫下面二维码免费获取更多详情
原文地址:http://blog.51cto.com/11233498/2128784