Update fails on passwordless mysql root user connection test
When updating a Debian 12 system where the mysql root user does not have a password it fails.
>> Update
Operating System: Debian 12.0 (Bookworm) or compatible
This application will update ISPConfig 3 on your server.
Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]: no
Checking MariaDB version 10.11.6 .. OK
Checking ISPConfig database .. Enter password:
mysqlcheck: Got error: 1698: Access denied for user 'root'@'localhost' when trying to connect
OK
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Unable to call mysql command line with credentials from mysql_clientdb.conf
This happens on update.php line 326 where a port number is used for mysql cli while not needed in this case.
A few lines earlier we have a mysqli_connect
test that does not specify a port number, thus letting php use the socket by default when connecting to localhost.
Maybe the answer is that only a root account with password is supported as the perfect server setup suggests to use.
But I prefer the passwordless way, which has now been the Debian default for some years.
Commenting the whole section that does the mysql cli test solves it for now. But it might be nice to only specify the port number when required.
And since no port number is included in the mysqli_connect
test it might be OK to also drop it here.
The same port number change would probably be useful in more places, atleast in checkDbHealth.
The port code was added in #4932 (closed), and relates a bit to #5851