Convert mysql database from 3.9.1 to 4.4.1 on new server already setup

I need to convert database from 3.9.1 to 4.4.1 on new server already setup…

Would it be best to just install 3.9.1 on the new server and then just follow the
upgrade instructions?

Or can I convert the database directly?

RHEL 7.6 / MariaDB 5.5

You can read here about incremental upgrades Explanation: upgrading Openfire
Although, you can probably download all sql upgrade scripts and run them manually against your database. But i would just do full Openfire updates. https://github.com/igniterealtime/Openfire/tree/master/distribution/src/database/upgrade