One more thing, I downgraded PHP to 7.4 and that fixed other db related issues.
Hi JReuben1251, I fixed this by changing my host setting to a socket connection. Specially changing from ‘localhost’ to ‘:/path/to/socket/mysqld.sock’. You can change this in the wp-config.php file under the wordpress directory.