mysql 5.7升级_mysql5.7升级小版本

mysql 5.7.20升级到当前最新的5.7.31 ,Windows环境https://www.cndba.cn/cndba/hehdba/article/4233

关闭并删除mysql服务

首先在服务窗口关闭mysql服务

E:/MySQL/mysql>cd bin

E:/MySQL/mysql/bin>mysqld —remove

Service successfully removed.

E:/MySQL/mysql/bin>cd ..

E:/MySQL/mysql>cd ..

替换mysql 相关文件

将mysql文件夹改名,然后将新版本解压命名为mysql将my.ini和data目录拷贝到mysql文件夹中

E:/MySQL>cd mysql

E:/MySQL/mysql>mysqld —install

Service successfully installed.

启动mysql服务

刷新服务窗口,启动mysql服务

E:/MySQL/mysql>cd bin

E:/MySQL/mysql/bin>mysql

Welcome to the MySQL monitor. Commands end with ; or /g.

Your MySQL connection id is 12

Server version: 5.7.31 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.https://www.cndba.cn/cndba/hehdba/article/4233

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.https://www.cndba.cn/cndba/hehdba/article/4233

Type ‘help;’ or ‘/h’ for help. Type ‘/c’ to clear the current input statement.

mysql> select version();

+—————-+

| version() |

+—————-+

| 5.7.31 |

+—————-+

1 row in set (0.00 sec)https://www.cndba.cn/cndba/hehdba/article/4233

https://www.cndba.cn/cndba/hehdba/article/4233

mysql> exit

Bye

执行升级操作

E:/MySQL/mysql/bin>mysql_upgrade.exe -uroot -pcape

mysql_upgrade: [Warning] Using a password on the command line interface can be i

nsecure.

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

Found outdated sys schema version 1.5.1.

Upgrading the sys schema.

Checking databases.

ejabberd.archive OK

ejabberd.archive_prefs OK

ejabberd.archive_search_result OK

ejabberd.archive_search_task OK

ejabberd.bosh OK

ejabberd.caps_features OK

ejabberd.carboncopy OK

ejabberd.im_muc_room_member OK

ejabberd.im_muc_room_stat OK

ejabberd.im_sys_config OK

ejabberd.im_unread_message OK

ejabberd.irc_custom OK

ejabberd.last OK

ejabberd.motd OK

ejabberd.msg_item OK

ejabberd.muc_online_room OK

ejabberd.muc_online_users OK

ejabberd.muc_registered OK

ejabberd.muc_room OK

ejabberd.muc_room_dissolved OK

ejabberd.oauth_token OK

ejabberd.privacy_default_list OK

ejabberd.privacy_list OK

ejabberd.privacy_list_data OK

ejabberd.private_storage OK

ejabberd.proxy65 OK

ejabberd.pubsub_item OK

ejabberd.pubsub_node OK

ejabberd.pubsub_node_option OK

ejabberd.pubsub_node_owner OK

ejabberd.pubsub_state OK

ejabberd.pubsub_subscription_opt OK

ejabberd.roster_version OK

ejabberd.rostergroups OK

ejabberd.rosterusers OK

ejabberd.route OK

ejabberd.sm OK

ejabberd.spool OK

ejabberd.sr_group OK

ejabberd.sr_user OK

ejabberd.user_favorite_contact OK

ejabberd.user_favorite_group_def OK

ejabberd.user_mc_room OK

ejabberd.user_sign OK

ejabberd.users OK

ejabberd.vcard OK

ejabberd.vcard_search OK

sys.sys_config OK

Upgrade process completed successfully.

Checking if update is needed.

重启mysql服务并验证版本

E:/MySQL/mysql/bin>mysql

ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: N

O)

E:/MySQL/mysql/bin>mysql -uroot -pxxxx

mysql: [Warning] Using a password on the command line interface can be insecure.

https://www.cndba.cn/cndba/hehdba/article/4233

ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: Y

ES)

因为刚才升级的原因登陆不上了,重启mysql服务https://www.cndba.cn/cndba/hehdba/article/4233

E:/MySQL/mysql/bin>mysql

Welcome to the MySQL monitor. Commands end with ; or /g.

Your MySQL connection id is 2

Server version: 5.7.31 MySQL Community Server (GPL)

https://www.cndba.cn/cndba/hehdba/article/4233

Copyright (c) 2000, 2020, 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.https://www.cndba.cn/cndba/hehdba/article/4233https://www.cndba.cn/cndba/hehdba/article/4233

Type ‘help;’ or ‘/h’ for help. Type ‘/c’ to clear the current input statement.

mysql> select version();

+—————-+

| version() |

+—————-+

| 5.7.31 |

+—————-+

1 row in set (0.00 sec)

mysql> show databases;

+——————————+

| Database |

+——————————+

| information_schema |

| ejabberd |

| mysql |

| performance_schema |

| sys |

+——————————+

5 rows in set (0.00 sec)

完毕

版权声明:本文为博主原创文章,未经博主允许不得转载。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值