Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: log with client ip address #1059

Closed
lgrio opened this issue Jun 19, 2017 · 1 comment
Closed

Feature request: log with client ip address #1059

lgrio opened this issue Jun 19, 2017 · 1 comment

Comments

@lgrio
Copy link

lgrio commented Jun 19, 2017

It would be very useful if, within the log file, there is the ip address of client that generates the log entry (now there is only the server ip address).

Example:
MySQL_Session.cpp:2667:handler(): [WARNING] Error during query on (0,10.0.0.XXX,3306): 1064, You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ORDER BY f.xxx_order ASC' at line 65

renecannao added a commit that referenced this issue Nov 30, 2017
If variable mysql-verbose_query_error is set, "Error during query" message will be extended adding:
- username
- client IP
- schemaname
- digest of the original query (not the original query itself)
@renecannao
Copy link
Contributor

Added variable mysql-verbose_query_error .
If variable mysql-verbose_query_error is set, "Error during query" message will be extended adding:

  • username
  • client IP
  • schemaname
  • digest of the original query (not the original query itself)

Example with mysql-verbose_query_error=false:

2017-11-30 01:26:55 MySQL_Session.cpp:2871:handler(): [WARNING] Error during query on (0,127.0.0.1,3306): 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 NULL' at line 1

Example with mysql-verbose_query_error=true:

2017-11-30 01:26:59 MySQL_Session.cpp:2869:handler(): [WARNING] Error during query on (0,127.0.0.1,3306) , user "root@127.0.0.1" , schema "information_schema" , 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0 NULL' at line 1 . digest_text = "SELECT ? ? NULL"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants