LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2019, 12:28 AM   #1
Veen77
LQ Newbie
 
Registered: Sep 2019
Posts: 6

Rep: Reputation: Disabled
Is it possible to use Auditd to log mysql commands run by any system or user ?


I want to log all the mysql queries and commands being run on the database. It can be by any user - home user / www-data / root / or any other. I want to use auditd to log all the queries. Is it possible?

I am using Ubuntu 18.04 server.
 
Old 09-09-2019, 12:55 AM   #2
archanasinghr
LQ Newbie
 
Registered: Sep 2019
Posts: 3

Rep: Reputation: Disabled
May be

I have already search on internet and I think you should use "ausearch" Tool on CentOS/RHEL.
 
Old 09-09-2019, 02:03 AM   #3
Veen77
LQ Newbie
 
Registered: Sep 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Please dont post useless reply

Quote:
Originally Posted by archanasinghr View Post
I have already search on internet and I think you should use "ausearch" Tool on CentOS/RHEL.
Ausearch is a tool to go through the logs by auditd. Your answer doesn't answer my question or even help me towards finding my answer. Please avoid ansering questions witout decent R&D on your side.

Thank You.
 
Old 09-09-2019, 06:57 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The audit system logs system calls and file accesses. It does not log database queries. I guess that MySQL has monitoring software that allows to do that.
 
1 members found this post helpful.
Old 09-09-2019, 09:44 AM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,708

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Quote:
Originally Posted by Veen77 View Post
I want to log all the mysql queries and commands being run on the database. It can be by any user - home user / www-data / root / or any other. I want to use auditd to log all the queries. Is it possible?
Yes, it is possible...probably...but not with auditd.

Quote:
Originally Posted by Veen77 View Post
Ausearch is a tool to go through the logs by auditd. Your answer doesn't answer my question or even help me towards finding my answer. Please avoid ansering questions witout decent R&D on your side.

Thank You.
Um. If you don't find a response helpful, just ignore it. There's no need to be rude about it...and please avoid asking questions without decent R&D, too. See the How to ask a question link in my sig.
 
1 members found this post helpful.
Old 09-09-2019, 05:50 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
To agree with berndbausch.

Don't think it is the correct or maybe the easy way.
From this. "The auditd subsystem is an access monitoring and accounting for Linux developed and maintained by RedHat. It was designed to integrate pretty tightly with the kernel and watch for interesting system calls." https://security.blogoverflow.com/20...ion-to-auditd/

Since you are asking about users issuing commands to mysql then I'd look at mysql audit methods.


It's always difficult to guess the correct answer.
Please consider that answers are sometimes wrong but they are offered for free and with good intent usually.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] after installation of MySQL could not log into mysql using temporary password in /var/log/mysqld.log User247 Linux - Server 2 12-25-2017 09:31 AM
The auditd daemon stops logging after deleting audit.log until auditd is restarted Latitude Linux - Security 2 06-20-2013 03:10 PM
Log all commands executed by any user? Possible helptonewbie Linux - Security 25 09-01-2009 08:34 AM
auditd: auditd startup failed cmschube Red Hat 2 05-11-2009 07:08 AM
auditd audit.log not display date or user mccartjd Linux - Security 10 06-11-2008 08:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration