I'm using Zeos 7.2 on a MySql 5 database.
I wonder how old that one is.
If I install Zeos via the Online Package Manager, the latest version is 8.0.0.
And if I load your project, it gives an error that "AutoEncodeStrings" is an unknown property.
Maybe there is a lot of work done to make it more compatible with UTF8.
You code works for me on Windows 10 with Lazarus trunk, Zeos 8.0.0 and libmysql.dll 5.7.24 with 10.5.19-MariaDB as back-end.
I get a MySql syntax error.
BTW. did you mention what error you got and I overlook this? Or did you just not mention it?