Dear Future self,
The next time you run into PHP Fatal error: Call to undefined method DB_Error::query() and you are pretty sure all the correct libraries are installed , check if you can connect to the database with the username / password you have configured. Just as today you might have migrated to a new mysql server and forgotten to update the connection string.
thank you for your attention.