First, I'll answer my own question with a little story ...
In an OP's server (don't recall provider) and OP desired to clone a production site to have a development site. Cpanel did provide Terminal and that's where I did the cloning.
Created the new DB via command line. After getting the clone up and running checked phpmyadmin because that was a tool OP would still use. In phpmyadmin, the DB I created from the command line didn't show!!! ????
Why? When I created the DB from command line I didn't include the customer prefix in DB name. Footnote to a migration?
Reasons for a migration:
On shared hosting and site has grown beyond the limitations of shared hosting.
Most common? Memory, Space, Inode limits, other?
Then one gets off into how much ... memory, space, inode limits. There does not exist a calculator app. More means more $ spent. And I find myself giving strange advice ... 'better to have more than enough than not enough'! What the heck does that mean!!!! :|
Devils are in the details!
Moodle Docs show mysql commands.
At one point in time those commands applied to both MySQL and MariaDB.
Defaults for character set/collation - now industry standard utf8mb4, collation has to match character set - but doesn't have to be utf8mb4_unicode_ci - config.php file comes into play.
MySQL
https://dev.mysql.com/blog-archive/new-defaults-in-mysql-8-0/
MariaDB
https://cpanel.net/blog/announcements/mariadb-server-to-become-default-database-in-cpanel/
From moodle docs:
mysqldump -h example.com -u myusername -p'mypassword' -C -Q -e --create-options mydatabasename > moodle-database.sql
Another option would be to use a tool like phpMyAdmin to manually make a backup.
-h may not be needed ... localhost.
The switches: -C -Q -e --create-options?
In mysql 8 are SSL/TLS now - but that's not really needed if DB is localhost.
Example of a command used in both MySQL and MariaDB
mysqldump
mysqldump is used to dump a database or a collection of databases for backup or transfer to another database server.
From MariaDB 10.5, the client is called mariadb-dump. It can still be accessed under its original mysqldump name via a symlink in Linux, or an alternate binary in Windows.
MariaDB starting with 11.0.1
From MariaDB 11.0.1, mysqldump (the symlink) is deprecated and removed from the mariadb"
Reference: https://mariadb.com/kb/en/mysqldump/
When OP decides to migrate to a VPS, the new server is spun up by provider. The account from shared hosting is copied to new VPS.
Translation: the customers environment is still in a user jail:
/home/accountid/ - even though /var/www/ exist.
That copy handles moodle code and moodledata but not the DB itself.
There is also the issue of old moodle code -> new VPS and the versions of PHP + extensions available on new VPS too high to run the older moodle code.
The bottom line ... harder to provide accurate docs on a Migration. Footnotes per provider if provider diffs are known. Related .. Mr. V's chart ... has footnotes ... nice to have but how many folks click on the footnote link?
So somewhere a disclaimer needs to be shared with readers ... may not work with all providers. And then to be complete, maybe separate providers pages that cover the diffs! :|. Wow! Mega!
'SoS', Ken