Comment to Database utf8mb4 collation
-
True. But at least it will identify the easily detectable issues. And if you wanted to - it would be possible to query the other schemas as well to detect table or field level differences. But in the real world, a restore from backup with wrong settings is going to represent a high rate of detection of problems, and the script provided by the original poster would seem to be a logical self heal solution if detected...