Strange behaviour here.
GOOD
Connecting to a Server version: 11.6.2-MariaDB-log MariaDB Server from another Mac works, with the same credential.
Connecting to the same Server from other applications on my MAC, using the same credentials works, such as Datagrip, Beaver, …
—
Both Macs are Sequoia 15.3
PHP 8.4.3 (cli) (built: Jan 15 2025 01:03:17) (NTS)
Copyright (c) The PHP Group
Built by Homebrew
Zend Engine v4.4.3, Copyright (c) Zend Technologies
with Zend OPcache v8.4.3, Copyright (c), by Zend Technologies
Server version: Apache/2.4.63 (Unix)
Server built: Jan 20 2025 19:35:41
BAD
The code called from this statement:
$connection = mysqli_connect($DBHOST, '***', '***', '***');
fails with this error on client:
PHP Warning: mysqli_connect(): Error while reading greeting packet. PID=1123 in config.php on line 54
[php:error] [pid 1123] [client 127.0.0.1:51713] PHP Fatal error: Uncaught mysqli_sql_exception: MySQL server has gone away in /opt/darkhold/config.php:54
Stack trace:
#0 /opt/darkhold/config.php(54): mysqli_connect('ServerIP', 'darkhold', Object(SensitiveParameterValue), 'darkhold')
#1 /opt/darkhold/global.php(2) (...)
And this on the server side:
[Warning] Aborted connection 3473 to db: 'unconnected' user: 'unauthenticated' host: 'ServerName' (This connection closed normally without authentication)
If someone could help, I’m working on this for all the weekend 🙁