- 关闭linux的防火墙,执行命令
chkconfig iptables off
- 从mysql官网上下载自己适合的mysql版本
- 传到服务器上/use/local/java目录下解压
tar -zxvf mysql-5.6.45-linux-glibc2.12-x86_64.tar.gz
- 将解压后的文件重命名为mysql
mv mysql-5.6.45-linux-glibc2.12-x86_64 mysql
- 进入Mysql目录,添加MySQL配置,创建Mysql用户组及用户
cp support-files/my-default.cnf /etc/my.cnf
#创建mysql用户组及用户
groupadd mysql
useradd -r -g mysql mysql
- 编辑/etc/my.cnf文件
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated serv