mysql5.6升级
mysql5.6的升级可以分为以下几个步骤:
安全关闭正在运行的MySQL实例
把/usr/local/mysql 的连接由MySQL5.6更改为MySQL5.7
启动MySQL实例,查看是否是MySQL5.7版本
使用mysql_upgrade命令升级系统表
首先:停止当前运行的MySQL实例,然后做如下操作
更改之后启动MySQL实例:
[root@test3 local]# service mysqld start
Starting MySQL.. SUCCESS![root@test3 local]# netstat-lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp0 0 0.0.0.0:22 0.0.0.0:* LISTEN 31179/sshd
tcp0 0 :::22 :::* LISTEN 31179/sshd
tcp0 0 :::3000 :::* LISTEN 25168/grafana-serve
tcp0 0 :::3306
然后连接MySQL,可以看到MySQL已经有原来的5.6版本升级为5.7版本:
[root@test3 ~]# mysql -S /tmp/mysql.sock -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connectionid is 4Server version:5.7.22-log MySQL Community Server (GPL)
Copyright (c)2000, 2014, Oracle, SkySQL Ab and others.
Type'help;' or '\h' for help. Type '\c' to clearthe current input s