I'm setting up a development environment.
I'd like to check whether logging works as expected for MySQL.
How can I do so programmatically from PHP?
Inspired by this answer, I merely ran a minimal test like this:
$pdo = new \PDO(
$result = $pdo->query( "signal sqlstate '45000' set message_text = 'Triggering error on purpose (test)';" );
The mysql error.log does not receive errors meant for the calling program.
Se the error.log documentation.