Its been five days without sleep. I have a Godaddy VPS that I'm migrating from shared hosting over to. I can install a fresh install with no problems... but my migration (and update) has been nothing but headaches. Followed the Moodle migration information and it worked well save one qwerk that I can't wrap my head around. Even though my database is all converted to Barracuda and my database is utf8mb4_unicode_ci I get an issue trying to log in where I get an error that says, "Error writing to database".
Now I even created a table and tried to connect and insert data via SQL from the PHP page just to test if I could write to the database. It worked fine. All my php bits seemed to be fine otherwise. After much digging I found one line in my config file that makes or breaks my instance. If dbcollation is set to anything other than - 'dbcollation' => 'utf8_general_ci', - it will not work.
The old/original config.php file does not work. Deleting it pushes through the new file creation but it creates the new config.php file with a utf8mb4_unicode_ci collation. The instance will load, I'll enter my login creds, hit login, and get "Error writing to database". 5 days later I rule out too many things and end up stumbling on an old config file that had the dbcollation as utf8_general_ci and it works beautifully.
What gives? Why must I use the utf8_general_ci instead of the utf8mb4_unicode_ci in the config.php file to get this to work? The former shared hosting instance was running 3.4.5 and I upgraded to 3.6.4 as it was available mid-process.