Upgrade of MariaDB, how to recover the database schema's in the data directory?
Hello,
I want to upgrade MariaDB on a Windows enviroment. I have it running as a service, so I decided to remove the version 10.5.x. The question came up "do you want to keep the data directory?". I have answered yes.
So I have still the data directory with all the database schema's.
I have installed the new MariaDB version 11.2.x, as a service, which is doing well. I have already installed a new database schema with Joomla 4.
But how do get the existing database schema's in this new MariaDB database? (One thing I have done, is copying (TotalCommander) it, just the schema's, from the old data directory to new directory, but that doesn't bring anything.
Answer Answered by Daniel Black in this comment.
The database's aren't directly transportable and its best to treat the entire datadir as a single entity.
My recommendation would be to take a mariadb-dump of your Joomla 4 database. Stop the MariaDB-11.2 instance, replace the datadir with your original databases, start the MariaDB-11.2 service, and import the Jooma 4 backup.
Note at the moment 11.2 is an Alpha release. Unless running on the very bleeding edge is something your willing to do as testing, I recommend moving back to 11.0 or 10.11 before restarting the MariaDB service in the previous instructions.