My home server will be offline for quite some time. As a result, I’ve decided to migrate my Nextcloud to a shared hosting server.
Everything is straight-forward except for the database migration. Specifically, dumping the current db is not an issue but restoring it to the new server seems to be problematic:
my hosting provider forces me to prepend my existing Nextcloud user name and database name with my hosting account user name. These are not the same as those in my current configuration. Furthermore, my existing Nextcloud server name is “localhost”; I cannot use this on the new server. Due to these naming conflicts, it seems that I will be prevented from importing (restoring) my database into the new server.
I’m at a loss as to how I should proceed. Is there some MySQL (MariaDB) “magic” available to help me overcome what I perceive to be a road block in my need to migrate?
I think it would be helpful to know if you’re trying to migrate the same Nextcloud version, which MariaDB version you are exactly using, if it is a shared or dedicated database, how you’re accessing the database and what the PRECISE error message is which is being displayed.
“how you’re accessing the database” ?? I’m accessing it through Nextcloud!
there is no error message yet! If I can restore the dump within the constraints as I had outlined in my OP, I’m sure that there will be some variation of “the database can’t be accessed”.
Please bear with me; perhaps I’m making more out of this than is necessary…
Will I not encounter problems when the User of dumped database has a different name than the User of the new database when I attempt to import the former?