I have tried many of the solutions I could find around but nothing seems to work.
I've just added php version 8.1.5 to MAMP. The way I did it was to just copy the php from my mac, into the php folder of MAMP and modified modules for apache to work. Now I can select PHP 8.1.5 from MAMP, launch the server and use my local apps normally.
SQL connection works fine too.
The issue I'm having is that while I'm using PHP 8.1.5 and try to access PHP my admin, I get this errors:
Welcome to phpMyAdmin
Error
Cannot connect: invalid settings.
mysqli::real_connect(): (HY000/2002): No such file or directory
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
I've changed my config file to recommended but still get the same errors.

NOTE: switching back to php 8.0.8 makes it work just fine so it doesn't look like it is a config problem but more a compatibility issue with phpmyadmin and the latest php version I added.
I just installed the latest of MAMP so I'm not sure what else can I try.
