When mysql was installed on centOS7, it was not set up, and version 5.7 was installed by default. Later, the problem was discovered when the workbench was used to back up the database. So upgrade the version (MySQL 5.7 to MySQL 8.0). But this error will be reported when trying to connect.
Solution:
- [Original address:] https://www.xiaocaicai.com/2018/05/mysql-errorthe-user-specified-as-a-definer-mysql-infoschemalocalhost-does-not-exist-when-trying-to-dump -tablespaces/
docker exec -it mysql bash
mysql -u root -p
mysql> SET GLOBAL innodb_fast_shutdown = 1;
mysql_upgrade -u root -p