Centos6.5安装mysql-5.7.23
Centos6.5安装mysql-5.7.23
1.卸载系统自带mysq(没有忽略此步骤)
[admin@big-data-0 ~]$ rpm -qa|grep mysql
mysql-community-common-5.7.19-1.el6.x86_64
rpm -e –nodeps mysql-community-common-5.7.19-1.el6.x86_64
2.下载解压安装包
[admin@big-data-0 apps]$ wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz
[admin@big-data-0 apps]$ tar -zxvf mysql-5.7.23-linux-glibc2.12-x86_64
3.修改配置文件
[admin@big-data-0 apps]$ cd mysql-5.7.23-linux-glibc2.12-x86_64/support-files/
[admin@big-data-0 support-files]$ vi mysql.server
4.安装
[admin@big-data-0 support-files]$ sudo cp mysql.server /etc/init.d/mysqld
[admin@big-data-0 support-files]$ cd ../bin/
[admin@big-data-0 bin]$ ./mysqld –user=mysql –basedir=/home/admin/apps/mysql-5.7.23-linux-glibc2.12-x86_64 –datadir=/home/admin/data/mysql/data –initialize
此步骤有可能报错:/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file:
解决方案:sudo yum remove libnuma.so.1
sudo yum –y install numactl.x86_64
yum install -y libaio
5.启动mysql服务
[admin@big-data-0 bin]$ service mysqld start
6.登录修改root密码
7.卸载