时间:2021-07-01 10:21:17 帮助过:7人阅读
http://dev.mysql.com/downloads/mysql/5.6.html#downloads
yeke
也可以直接复制下载命令
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.22.tar.gz
2.安装依赖性文件
yum -y install cmake bison git ncurses-devel gcc gcc-c++
3.创建用户组
groupadd mysql
useradd -g mysql mysql
4.解压安装包。(我这里要在/usr/local/src下进行)
tar zxvf mysql-5.6.38.tar.gz -C /usr/local/src
#mkdir /usr/local/mysql
#mkdir /usr/local/mysql/data
5.cd mysql-5.6.38/ 开始编译
make ;
make install
6.修改目录属主权限
#chown -R mysql:mysql /usr/local/mysql/data/
#chown -R mysql:mysql /usr/local/mysql/
7.数据库初始化
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/mysql --pid-file=/usr/local/mysql/data/mysql/mysql.pid --tmpdir=/tmp
到这里缺少文件perl-Data-Dumper.rpm
可以直接安装
rpm -ivh http://repo.openfusion.net/centos7-x86_64//perl-Data-Dumper-2.154-1.of.el7.x86_64.rpm
chown -R mysql:mysql my.cnf
8.配置文件 vim my.cnf
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
#port = .....
#server_id = .....
socket = /usr/local/mysql/mysql.sock
log-error= /usr/local/mysql/data/error.log
pid-file = /usr/local/mysql/data/mysql.pid
user = mysql
tmpdir = /tmp
9.启动 cd /usr/local/mysql/support-files
./mysql.server start
cd /usr/local/mysql/bin
./mysql -u root -p
linux下mysql源码包安装
标签:roo cmake epo 安装包 iso 安装 文件 mysq git