How do I set a custom MySQL IP address?

Welcome.
First, here’s some lecture for you:
https://community.zammad.org/t/asking-for-help-on-community/2262/2

Secondly, your installation is not finished with ignoring that.

You might want to ensure that you’re using an UTF-8 based database.
You’ll run in more and more errors, if you don’t fix that.

(I’ll ignore the other problems you experience, because the above needs to be fixed first)

You’ll need to add host: xyz to your database.yml.
Please note that we had better experience with postgresql.