1、首先关闭linux的防火墙,执行命令
chkconfig iptables off
image
image
image
image
image
3、下载后的mysql文件
mysql-5.6.40-linux-glibc2.12-i686.tar.gz
将下载好的mysql压缩文件放置在linux的/usr/local文件夹下,解压该压缩文件
tar -zxvf mysql-5.6.40-linux-glibc2.12-i686.tar.gz
将解压后的文件重命名为mysql
mv mysql-5.6.40-linux-glibc2.12-i686 mysql
4、创建mysql用户组及用户
groupadd mysql
useradd -r -g mysql mysql
5、进入到mysql目录,执行添加MySQL配置的操作
cp support-files/my-medium.cnf /etc/my.cnf
或:
cp support-files/my-default.cnf /etc/my.cnf
是否覆盖?按y 回车
6、编辑/etc/my.cnf文件;
vi /etc/my.cnf
在my.cnf文件中添加或者修改相关配置,更改完成后保存退出
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# 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 server, else 1