MikroTik’s API protocol is about letting other languages, including PHP, access the router. It does not allow the router itself to do anything extra.
PHP can access a MySQL database on its own, without the need for a MikroTik API client. See the mysqli extension.
So… what you can do is use PHP as a “bridge” between MySQL and MikroTik, since it can access both. The flow of events will be more akin to
PHP ==(accesses)==> MySQL
MySQL ==(replies)==> PHP
PHP ==(accesses)==> MikroTik
MikroTik ==(replies)==> PHP
or perhaps vice-versa, i.e.
PHP ==(accesses)==> MikroTik
MikroTik ==(replies)==> PHP
PHP ==(accesses)==> MySQL
MySQL ==(replies)==> PHP
It’s also important to note that you can’t authenticate hotspot users via the API protocol. You can add/edit/remove users, but the actual authentication process can still only be performed by a hotspot web page sitting at the router itself, to which users connect via their browser.