The ejabberd source tarball contains four SQL schema files for external database engines, although it defaults to using its own internal DB. The four supported external DB engines are SQLite, MSSQL, MySQL, PostgreSQL. The default in the ebuild is USE=mysql. However, at lease with the USE=mysql default, *ONLY* the SQLite schema is installed from $WORK/ejabberd/sql to /usr/lib64/ejabberd/priv/sql. To install the DB schema you must unpack the source again manually and copy the file yourself. This affects all ebuild versions from 16.09 through 17.04-r1.
Thank you for your report. If you found already a solution, you can help the maintainer by attaching a patch or the corrected file.