---
# System prepended metadata

title: 'mysqli::real_connect(): (HY000/2002): No such file or directory'
tags: [phpMyAdmin]

---

# mysqli::real_connect(): (HY000/2002): No such file or directory

###### tags: `phpMyAdmin`

* OS：macOS Catalina 10.15.6
* MySQL：mysql-8.0.21-macos10.15-x86_64 ([Ref.](https://dev.mysql.com/downloads/mysql/))
* phpMyAdmin：phpMyAdmin-5.0.2-all-languages ([Ref.](https://www.phpmyadmin.net/downloads/))
* PHP：7.3.11

![2002](https://i.imgur.com/NKFzM3E.png)

My Solution
---
* Edit **/Library/WebServer/Documents/phpmyadmin/config.inc.php**

Change
``` php
$cfg['Servers'][$i]['host'] = 'localhost';
```
To
``` php
$cfg['Servers'][$i]['host'] = '127.0.0.1';
```


