I am migrating a very old server configuration to AWS Linux 2. Here are the details of the old and new configuration:
Old Server
OS: Fedora 11
Openfire: 3.6.4
MySQL: 5.1
New Server
OS: AWS Linux 2
Openfire: 4.6.2
MariaDB: 5.5
The MySQL database was exported from the old server and successfully imported into the new server. After installing Openfire 4.6.2 on the new server and setting up the configuration I started Openfire and had difficulty connecting to MariaDB. Searched the forums and found that I needed to install the MariaDB connector (mariadb-java-client-1.8.0.jar). With that change Openfire started but I have errors in the logs as follows:
SchemaManager: Failed to execute SQL: ALTER TABLE ofMucConversationLog ADD COLUMN stanza CLOB
I was able to trace this down to the file resources/database/upgrade/24/openfire_db2.sql being executed during the upgrade, even though my openfire.xml uses the MySQL driver:
<driver>com.mysql.jdbc.Driver</driver>
<serverURL>jdbc:mysql://localhost:3306/openfire</serverURL>
To prove this I saved off the original openfire_db2.sql file (in the resources/database/upgrade/24 directory) and created a symlink that pointed to the openfire_mysql.sql file. When I restarted Openfire I could see that the upgrade succeeded for 24 but then failed on another upgrade.
Iāve since found documentation that recommends doing a more incremental upgrade when there is this kind of disparity between versions but Iām not sure that would help in this situation. Does anyone have any idea why the openfire_db2.sql file would be used instead of the openfire_mysql.sql file during the upgrade processing? Is there another place in the configuration that I should be specifying that this is a MySQL database?