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.卸载

  

分享图片

相关文章

linux下开机自启: 在/etc/init.d目录下新建文件elasticsear...
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以...
最简单的查看方法可以使用ls -ll、ls-lh命令进行查看,当使用...
ASP.NET Core应用程序发布linux在shell中运行是正常的。可一...
设置时区(CentOS 7) 先执行命令timedatectl status|grep &...
vim /etc/sysconfig/network-scripts/ifcfg-eth0 B...