Mac Catalina
Mysql server 8.02 community server
phpmyadmin 5.0.2
php 7.47
Phpmyadmin is working fine. See screen capture:
From phpmyadmin, I was able to create a local user and db, both called test on localhost.
However, I am not capable of connecting to it from my php program:
<?php
$db_creds = array();
$db_creds['user'] = 'test';
$db_creds['pwd'] = 'xxxxxxxxx';
$db_creds['name'] = 'test';
$db_creds['host'] = 'localhost';
$mysqli = new mysqli($db_creds['host'], $db_creds['user'], $db_creds['pwd'], $db_creds['name']);
gives me the following error message:
Warning: mysqli::__construct(): (HY000/2002): No such file or directory in /Users/my-mac/Dropbox/joe/development/php/test_2.php on line 8 (last line)
Any ideas?