diff --git a/README.md b/README.md index 10accea..e86f831 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,11 @@ Usage: By default, mysql-proxy listens on :4040. -**NB: The hostname will always be localhost!** +**NB: By default the hostname in the script will always be set to 'localhost' since you are connecting over the proxy and the proxy connects locally!** -To connection from the shell to test, use: +To start a connection from the shell to test, use: mysql -u username -p --host=127.0.0.1 --port=4040 When using a remote proxy, simply replace `127.0.0.1` with the correct remote address. - - - diff --git a/mysql-proxy-log-error-queries.lua b/mysql-proxy-log-error-queries.lua index a1be463..9eb6fd0 100644 --- a/mysql-proxy-log-error-queries.lua +++ b/mysql-proxy-log-error-queries.lua @@ -22,7 +22,7 @@ end function insert_query(err_t, err_n, err_m) local query = "INSERT INTO `somedb`.`mysql_error` " .. "(`date`, `err_num`,`err_type`, `err_message`, `problem_query`, `conn_id`)" .. - "VALUES( NOW(), " .. + " VALUES ( NOW(), " .. err_n .. "," .. "\"" .. err_t .."\"" .. "," .. "\"" .. err_m .. "\"" .. "," ..