Linux/Centos 源码编译安装Mysql5.6

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux/Centos 源码编译安装Mysql5.6相关的知识,希望对你有一定的参考价值。

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
如果对此有兴趣,请扫下面二维码免费获取更多详情
技术分享图片

以上是关于Linux/Centos 源码编译安装Mysql5.6的主要内容,如果未能解决你的问题,请参考以下文章

Linux(CentOS或RadHat)下MySQL源码安装

运维笔记:Linux(CentOS8)免编译安装mysql5.7.33最新版本

linux centos7下源码 tar安装mysql5.7.23(5.7以上均可试用)

linux centos 6.10 编译安装mysql5.6.40版本,数据库主从

Linux CentOS 使用Yum源安装MySQL 5.7

Linux CentOS 7 安装PostgreSQL 9.5(源码编译)