The database connection is not serializable
I experienced this issue after manually deleting some translated configuration files. From then on I was not able to successfully config import anymore without being interrupted with the fatal error from your question.

I then tried to run config import after uninstalling locale, which worked but have also deleted lots of translation from the database. Bad.

I could restore the configs in question and then remove them from the UI before exporting them again. Boring.

So I deleted the original configuration objects from an update function (and thereby also deleted the translations), and afterwards run configuration import again, where the original configs then got restored automatically (as their files still existed) WITHOUT translation.

/**
 * Remove unwanted translations.
 */
function MYMODULE_update_8005(&amp;$sandbox) {

  $configs = [
    'image.style.crop_thumbnail',
    'views.view.user_admin_people',
  ];

  foreach ($configs as $config) {
    Drupal::configFactory()-&gt;getEditable($config)-&gt;delete();
  }
}




EDIT: Only shortly after I had the same problem again. Again it was a missing config (I deleted manually, don't do that) and took me hours to find out which one exactly. This time it was menu_item_extras which required menu_item_extras.utility.yml. Actually I uninstalled menu_item_extras but maybe menu_item_extras can't be uninstalled that simply. But that's a different issue.

What's left to conclude now is: Did you manually delete some config files prior to getting this error?