Get the App
SLTechnology News&Howtos  ›  Database  › 

How to solve the mysqldump routines problem of MySQL5.7

Shulou Source: shulou.com Published: 2022-05-31 13:58:36 10月02日 Update

This article focuses on "how to solve the mysqldump routines problem of MySQL5.7". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the mysqldump routines problem of MySQL5.7.

Scene:

1 create a new instance of 5.7.12

2 Export the whole library

Mysqldump-all-databases-uroot-ptest-set-gtid-purged=off-single-transaction-quick-R-events > / tmp/a.sql

3 check before export:

Mysql > select count (*) from mysql.proc

+-+

| | count (*) |

+-+

| | 47 |

+-+

1 row in set (0.00 sec)

Mysql > select * from host_summary

+- -+

| | host | statements | statement_latency | statement_avg_latency | table_scans | file_ios | file_io_latency | current_connections | total_connections | unique_users | current_memory | total_memory_allocated |

+- -+

| | localhost | 1823 | 1.14s | 623.98 us | 468 | 7000 | 714.18 ms | 1 | 7 | 1 | 0 bytes | 0 bytes |

+- -+

1 row in set (0.04 sec)

4 Import the whole library:

Mysql-uroot-ptest

< /tmp/a.sql 5 mysql>

Select count (*) from mysql.proc

+-+

| | count (*) |

+-+

| | 0 |

+-+

1 row in set (0.00 sec)

Mysql > select * from sys.host_summary

ERROR 1356 (HY000): View 'sys.host_summary' references invalid table (s) or column (s) or function (s) or definer/invoker of view lack rights to use them

There is no such problem in 5.56.

Because there is no proc in their system.

There are two ways to avoid:

1 do not export mysql.proc table

Mysqldump-all-databases-uroot-ptest-set-gtid-purged=off-single-transaction-quick-R-events-ignore-table=mysql.proc > / tmp/a.sql

2 upgrade after import is completed

Therefore, no matter which backup method it is, it is best to perform the upgrade after the restore.

In addition:

There is no such problem with the way you use innobackup.

At this point, I believe you have a deeper understanding of "how to solve the mysqldump routines problem of MySQL5.7". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Questions methods content learning practical deeper two interests scenarios backups examples practicality practical easy to operate methods more best friends systems websites Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MySQL Apple Redmi OPPO Reno