个人博客

mysql5.6 升级 mysql5.7

16 07月
作者:西洪室|分类:技术
服务器使用的mysql是通过yum安装的,升级采用yum方式
1、卸载mysql5.6
yum remove mysql-*
2、安装mysql5.7
[root@localhost ~]# wget http://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
[root@localhost ~]# yum localinstall mysql80-community-release-el7-3.noarch.rpm
[root@localhost ~]# vim /etc/yum.repos.d/mysql-community.repo
......
# Enable to use MySQL 5.7
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
......
3、升级数据库
检查mysql日志,里面显示
......
InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
......
按照提示升级数据库
[root@localhost ~]# mysql_upgrade -uroot
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.engine_cost                                  OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.gtid_executed                                OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.server_cost                                  OK
mysql.servers                                      OK
mysql.slave_master_info                            OK
mysql.slave_relay_log_info                         OK
mysql.slave_worker_info                            OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Upgrading the sys schema.
Checking databases.
azkaban.active_executing_flows                     OK
azkaban.active_sla                                 OK
azkaban.execution_flows                            OK
azkaban.execution_jobs                             OK
azkaban.execution_logs                             OK
azkaban.project_events                             OK
azkaban.project_files                              OK
azkaban.project_flows                              OK
azkaban.project_permissions                        OK
azkaban.project_properties                         OK
azkaban.project_versions                           OK
azkaban.projects                                   OK
azkaban.properties                                 OK
azkaban.schedules                                  OK
azkaban.triggers                                   OK
sys.sys_config                                     OK
Upgrade process completed successfully.
Checking if update is needed.


浏览168 评论0
返回
目录
返回
首页
OpenVPN安装(编译安装) OPENWRT_x86(19.07.3)界面添加cpu温度和使用率

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。