Centos6.5安装mysql-5.7.23
Posted pig-driving-spacecraft
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos6.5安装mysql-5.7.23相关的知识,希望对你有一定的参考价值。
1.卸载系统自带mysq(没有忽略此步骤)
[[email protected] ~]$ 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.下载解压安装包
[[email protected] apps]$ wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz
[[email protected] apps]$ tar -zxvf mysql-5.7.23-linux-glibc2.12-x86_64
3.修改配置文件
[[email protected] apps]$ cd mysql-5.7.23-linux-glibc2.12-x86_64/support-files/
[[email protected] support-files]$ vi mysql.server
4.安装
[[email protected] support-files]$ sudo cp mysql.server /etc/init.d/mysqld
[[email protected] support-files]$ cd ../bin/
[[email protected] 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服务
[[email protected] bin]$ service mysqld start
6.登录修改root密码
7.卸载
以上是关于Centos6.5安装mysql-5.7.23的主要内容,如果未能解决你的问题,请参考以下文章