3.请保证一些路径的设置和以前的my.cnf一致,如果设置错误,很可能导致启动不了数据库
[ERROR] Could not use /data/slowlog/slow.log for logging
我这里是由于慢日志的位置和老的mysql5.6路径不一致,创建/data/slowlog即可,这里要仔细看报错,然后根据报错来发现和解决问题。
验证结果
Part1:输入用户名密码检查结果
[root@HE3 ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.15-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.15-log |
+------------+
1 row in set (0.00 sec)
Part2:验证库和表是否有丢失
123456789101112 mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| helei |
| mysql |
| performance_schema |
| sys |
| test |
+--------------------+
6 rows in set (0.00 sec)
升级5.7后,我们会发现多了一个sys库,这个库有很多的功能,以后再给大家慢慢介绍~
——总结——
MySQL升级有多种方式,但无论采用何种方式,都要做好备份和回滚的准备,以避免升级失败所带来的损失。由于笔者的水平有限,编写时间也很仓促,文中难免会出现一些错误或者不准确的地方,不妥之处恳请读者批评指正。