Bootstrap FreeKB - mySQL / MariaDB - log level
mySQL / MariaDB - log level

Updated:   |  mySQL / MariaDB articles

The following command can be used to determine the current log level.

mysql -e "select @@log_warnings"


Something like this should be returned.

| @@log_warnings |
|              2 |


There are a number of log levels.

  • 0 = the least logging
  • 1 = more logging
  • 2 = even more logging
  • 3 = verbose logging
  • 4 = even more verbose logging
  • 9 = the most logging possible


The log level can temporarily be change at runtime like this.

mysql -e "SET GLOBAL log_warnings=9"


Or the log level can permanently be changed in the my.cnf file. If you change the directive in my.cnf, you will need to restart mySQL or MariaDB for this change to take effect.



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee


Add a Comment

Please enter 856b2b in the box below so that we can be sure you are a human.