Collation conflicts between views and functions when using utf8mb4_unicode_ci collation
Before defining Stored Routines, etc, establish the desired CHARACTER SET and COLLATION.  One way to do that is via SET NAMES.
Also check
SHOW CREATE DATABASE

utf8mb4_unicode_520_ci is newer than utf8mb4_unicode_ci.  (I don't know what collation changes were made by Unicode between their 4.0.0 and 5.2.0 versions.  You may never notice a difference.)