Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql upgrade (physical upgrade)

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mysql upgrade is a regular job. Sort out the upgrade steps (physical upgrade).

1. Shut down the mysql service

2, higher version software covers lower version software (replace basedir)

3. Give the new high version software mysql permission

4. Use the new software to open the database

5, perform mysql_upgrade upgrade

Experiment:

Upgrade from 5.6.23 to 5.7.12

1. Shut down the service of the running mysql5.6.23

2. Delete the lower version of mysql software (basedir)

[root@mysqlupgrade mysql] # rm-rf mysql/

3. Extract the high version of the mysql package and overwrite it to the original location

[root@mysqlupgrade soft] # tar xzvf mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz-C / data/mysql/

[root@mysqlupgrade mysql] # mv mysql-5.7.12-linux-glibc2.5-x86_64 mysql

4, grant permissions

[root@mysqlupgrade mysql] # chown-R mysql:mysql mysql/

5. Open the database

[root@mysqlupgrade mysql] # bin/mysqld_safe-ledir=/data/mysql/mysql/bin-user=mysql &

6. Enter the database and view the current version

Mysql > select version ()

+-+

| | version () |

+-+

| | 5.7.12 |

+-+

1 row in set (0.00 sec)

6meme mysqlskills upgrade upgrade

[root@mysqlupgrade mysql] # bin/mysql_upgrade-udbauser-p123456-h292.168.56.99-P3306

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

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.

Sys.sys_config OK

Upgrade process completed successfully.

Checking if update is needed.

[root@mysqlupgrade mysql] #

Note:

An error was reported when upgrading

[root@mysqlupgrade mysql] # / data/mysql/mysql/bin/mysql_upgrade-udbauser-p123456

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

Looking for 'mysql' as: / data/mysql/mysql/bin/mysql

Looking for 'mysqlcheck' as: / data/mysql/mysql/bin/mysqlcheck

Error: Failed while fetching Server version! Could be due to unauthorized access.

FATAL ERROR: Upgrade failed

Mysql-udbauser-p123abc456-h292.168.56.99-P3306

Test whether this can be connected. You must be able to connect.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report