me小怪兽

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

mysql5.7版本升级__超详细

mysql版本下载https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz

1.备份mysql的bin目录下所有文件

[root@localhost ~]# cd /home/mysql
[root@localhost mysql]# ls
bin data include man mysql.sock.lock share
COPYING docs lib mysql.sock README support-files
[root@localhost mysql]# tar zcf bin.tar.gz bin


2.将下载好的新版本mysql解压并把新bin下*拷贝到旧bin*
新版本的版本:mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz

[root@localhost mysql]# tar zxvf mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
[root@localhost mysql]# /etc/init.d/mysql stop
[root@localhost mysql]# \cp -r /root/mysql-5.7.38-linux-glibc2.12-x86_64/bin/* /home/mysql/bin/
[root@localhost mysql]# /etc/init.d/mysql start


3.更新操作

[root@localhost mysql]# mysql_upgrade -uroot -p123456 --force --skip-version-check -S /home/mysql/mysql.sock

Enter password:
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
sys.sys_config OK
Upgrade process completed successfully.
Checking if update is needed.
#升级完登录mysql

复制代码
[root@localhost mysql]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.38-log MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
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.38-log |
+------------+
1 row in set (0.00 sec)

[root@localhost mysql]# mysql -V    #版本查看

  mysql Ver 14.14 Distrib 5.7.38, for linux-glibc2.12 (x86_64) using EditLine wrapper

复制代码

此时mysql升级完成

posted on   me小怪兽  阅读(1041)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示