While the error log stores the SQL errors, it may be useful to keep such errors in a separate log, which will then be used to debug the applications. This can be done via SQL_ERROR_LOG
, a plugin introduced in MariaDB 5.5.
The
SQL_ERROR_LOG
plugin is not installed by default. To install this, you can run the following SQL statement:
MariaDB [(none)]> INSTALL SONAME 'sql_errlog'; Query OK, 0 rows affected (0.04 sec)
MySQL users will probably notice that we used a MariaDB extension to the INSTALL
statement. This syntax allows installing all plugins contained in the sql_errlog
library, not only a specific plugin. In this case, the library contains only one plugin, so the only advantage is that the command is shorter. However, there is another difference: we did not include the file extension (.so
or .dll
), because it is optional in MariaDB. This makes the command independent from the...