allora, ho rimosso tutto apache e php e reinstallati.

adesso non ho più l'errore di mysqli, ma ho scoperto il vero errore:
codice:
SQLSTATE[HY000] [2002] No such file or directory