I am trying to select the default collation of a database server value using php code. So far I was able to accomplish it using the following select statement. But when the default collation value was changed by me the result of the query remained the same. However I want this to be able to select from both mySQL and MariaDB while having a robust method to do this thanks.
$sql = 'SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME ='.'"information_schema"';