The "Your php installation lacks MySql support" error happens if the PHP MySQL extension is not loading. You may have it installed somewhere, but it's not installed and configured to load for the version of PHP under which CollectiveAccess is running on your server. For Ubuntu if you've installed it, it should be enabled by default. So the first thing I'd trying it to install just that extension again. Assuming you've installed PHP 8.2 (which is what those docs use) try this:
sudo apt install -y php php8.2-mysql