WP-CLI PHP MySQL extension missing

After updating PHP from 7.0 to 7.2 and installing the usual apt-get install php7.2-mysql php-mysql extensions, as well as reloading the server service apache2 reload && service mysql reload WP-CLI can still produce an error Your PHP installation appears to be missing the MySQL extension which is required by WordPress when trying to perform basic tasks, even though existing WordPress installations are working fine and are able to interact with MySQL the server, meaning the PHP mysql extension is set up correctly.

The solution is to reload the terminal instance as well. Even though wp --info reflects the new PHP version there seem to be some internal things that do not get updated without restarting completely.