mysql - match queries case insensitive

  - improve opening database log message
  - log also erroneous query