{"id":143,"date":"2023-10-17T14:47:59","date_gmt":"2023-10-17T12:47:59","guid":{"rendered":"http:\/\/130.61.57.200\/?p=143"},"modified":"2023-10-17T14:50:02","modified_gmt":"2023-10-17T12:50:02","slug":"read-audit-log-in-mysql","status":"publish","type":"post","link":"http:\/\/130.61.57.200\/index.php\/2023\/10\/17\/read-audit-log-in-mysql\/","title":{"rendered":"Read Audit log in  MySQL"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>SELECT @@server_uuid as server_uuid, ts, class, event, login_ip,login_user,connection_id,&lt;br&gt;status,connection_type,_client_name,_client_version,&lt;br&gt;command,sql_command,command_status&lt;br&gt;FROM&lt;br&gt;JSON_TABLE&lt;br&gt;(&lt;br&gt;AUDIT_LOG_READ( &#039;{ &quot;start&quot;: {\\&quot;timestamp\\&quot;: \\&quot;2023-08-16 15:33:37\\&quot;}, \\&quot;max_array_length\\&quot;: 500 }&#039; ),&lt;br&gt;&#039;$&#091;*]&#039;&lt;br&gt;COLUMNS&lt;br&gt;(&lt;br&gt;ts TIMESTAMP PATH &#039;$.timestamp&#039;,&lt;br&gt;class VARCHAR(20) PATH &#039;$.class&#039;,&lt;br&gt;event VARCHAR(80) PATH &#039;$.event&#039;,&lt;br&gt;login_ip VARCHAR(200) PATH &#039;$.login.ip&#039;,&lt;br&gt;login_user VARCHAR(200) PATH &#039;$.login.user&#039;,&lt;br&gt;connection_id VARCHAR(80) PATH &#039;$.connection_id&#039;,&lt;br&gt;status INT PATH &#039;$.connection_data.status&#039;,&lt;br&gt;connection_type VARCHAR(40) PATH &#039;$.connection_data.connection_type&#039;,&lt;br&gt;_client_name VARCHAR(80) PATH &#039;$.connection_data.connection_attributes._client_name&#039;,&lt;br&gt;_client_version VARCHAR(80) PATH &#039;$.connection_data.connection_attributes._client_version&#039;,&lt;br&gt;command VARCHAR(40) PATH &#039;$.general_data.command&#039;,&lt;br&gt;sql_command VARCHAR(40) PATH &#039;$.general_data.sql_command&#039;,&lt;br&gt;command_status VARCHAR(40) PATH &#039;$.general_data.status&#039;&lt;br&gt;)) as audit_log;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":145,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-143","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql"],"blocksy_meta":[],"_links":{"self":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":2,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"predecessor-version":[{"id":146,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/143\/revisions\/146"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media\/145"}],"wp:attachment":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/tags?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}