All client commands to syslog?

2013-03-28 Thread Rafał Radecki
Hi All. I have a production setup of four databases connected with replication. I would like to log every command that clients execute for auditing. I've read

RE: All client commands to syslog?

2013-03-28 Thread Guy_Lichtman
Hi, You can check out the McAfee MySQL Audit Plugin at: https://github.com/mcafee/mysql-audit It is an open source plugin providing audit capabilities for MySQL. It can be used to log executing commands. It can log to a file or over a unix domain socket to syslog-ng. Best, Guy

Re: All client commands to syslog?

2013-03-28 Thread yoku ts.
Hello, --syslog is option of mysql command line client and it works in my environment. Do you put [mysql] section in your my.cnf? Regards, yoku 2013/3/28 Rafał Radecki radecki.ra...@gmail.com: Hi All. I have a production setup of four databases connected with replication. I would like to

Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Antonio Fernández Pérez
Hi everybody, Once I have done the defragmentation of MySQL tables, mysql-tunner.pl suggests me do it again. Is this correct? I think that the idea is that in the result of the script there are not fragmented tables ... Any ideas? Thank you very much. Best regards, Antonio.

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Reindl Harald
Am 28.03.2013 12:09, schrieb Antonio Fernández Pérez: Hi everybody, Once I have done the defragmentation of MySQL tables, mysql-tunner.pl suggests me do it again. Is this correct? I think that the idea is that in the result of the script there are not fragmented tables ... Any ideas?

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Antonio Fernández Pérez
Hi Reindl, Thanks for your reply. So, is it not necessary (not recommended) to defragment tables if I have a lot of write operations (writing or deleting)? Best regards, Antonio.

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Reindl Harald
Am 28.03.2013 12:28, schrieb Antonio Fernández Pérez: So, is it not necessary (not recommended) to defragment tables if I have a lot of write operations (writing or deleting)? it is recommended but not permanently and not blindly i use a daily cronjob which runs optimize table on tables with

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Antonio Fernández Pérez
Ok. Thank you very much. Best regards, Antonio.

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Antonio Fernández Pérez
Hello Manuel, Exactly. My objective doing performance MySQL it isn't to free disk space (it isn't the problem). I would like to get a good performance using cache and setting good values to configuration variables. I will defrag tables once per month. Best regards, Antonio.

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Manuel Arostegui
Hello Antonio, As Reindl said, it is recommended but it shouldnt be done just everyday if your tables are quite big and you use query cache. If you do have lot of writes and deletes (depending on what you consider a lot), your table will indeed have lot of 'blank rows' which eat disk space.

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Bheemsen Aitha
Hi Reindl, I would like to implement your strategy of optimizing tables. Can you please share how are running these scripts? Where does the mysql-wrapper-class exist? And what parameters need to be passed? Thanks Bheem Aitha MySQL and Oracle DBA On Mar 28, 2013 4:43 AM, Reindl Harald

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Reindl Harald
optimizeall() is simply called from a cron script the mysql-wrapper does not exist in public but you get the table overhead with SHOW TABLE STATUS as you can see below Am 28.03.2013 16:59, schrieb Bheemsen Aitha: I would like to implement your strategy of optimizing tables. Can you please

RE: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Rick James
How often to OPTIMIZE? The Short answer: Never. The Long answer: A _few_ tables _may_ need OPTIMIZE _sometimes_. One test: Is the free space (according to SHOW TABLE STATUS or equivalent information_schema stuff) is 10%, then OPTIMIZE. Maybe. However... That math works OK for MyISAM,

Re: Defragmentation of MySQL tables, how many times have I to do it?

2013-03-28 Thread Reindl Harald
Am 28.03.2013 19:43, schrieb Rick James: I have never traced a performance issue in InnoDB to the need for OPTIMIZE. but with files_per_table you can get back GIGABTYES of disk-space depending on your backups this may be relevant The Query Cache is irrelevant to this discussion it is NOT

Re: Show ROUTINE body, not PROCEDURE

2013-03-28 Thread Peter Brawley
On 2013-03-28 3:33 PM, Dotan Cohen wrote: On Wed, Mar 27, 2013 at 5:46 PM, h...@tbbs.net wrote: 2013/03/27 08:01 +0200, Dotan Cohen Actually, it is the user that I am logged in as that created the function. That is why I find it hard to believe that one needs root / admin access to see its

Re: Show ROUTINE body, not PROCEDURE

2013-03-28 Thread Dotan Cohen
On Wed, Mar 27, 2013 at 5:46 PM, h...@tbbs.net wrote: 2013/03/27 08:01 +0200, Dotan Cohen Actually, it is the user that I am logged in as that created the function. That is why I find it hard to believe that one needs root / admin access to see its definition. And that user set DEFINER