Re: user last activity and log in

2012-10-04 Thread Singer Wang
Mellow greetings, Enhance your calm. Lets get our facts straight and not go off our rockers. MySQL 5.6 Enterprise edition will be able to do this natively ( https://blogs.oracle.com/MySQL/entry/new_in_mysql_enterprise_edition), but otherwise you cannot do it natively. This does not mean its imposs

Re: user last activity and log in

2012-10-04 Thread Keith Murphy
One small correction. Init-connect doesn't require a restart of MySQL. I was thinking of init-file. So that's even better. On Thursday, October 4, 2012, Keith Murphy wrote: > My friend Dave Holoboff wrote this up some time ago: > > > http://mysqlhints.blogspot.com/2011/01/how-to-log-user-conne

Re: user last activity and log in

2012-10-04 Thread Keith Murphy
My friend Dave Holoboff wrote this up some time ago: http://mysqlhints.blogspot.com/2011/01/how-to-log-user-connections-in-mysql.html You know you people sound like children. Really unprofessional. Go ahead --- call me names. i left middle school almost 30 years ago. It won't bother me. Can w

Re: user last activity and log in

2012-10-04 Thread Reindl Harald
beside the fact that msql CAN NOT do this at all the median is not really releavt in the median you see also night hours with zero load on a typical webserver with load you have much more * a cms system * many page requests per second * no you can not use persistent connections if you have let

RE: user last activity and log in

2012-10-04 Thread Rick James
In looking at a couple hundred machine, I see that Connections / Uptime has a median of about 0.5 (one connection every 2 seconds) and a max of about 140. 140 writes to some audit table _might_ have a small impact on the system. > -Original Message- > From: Claudio Nanni [mailto:claudio

RE: InnoDB corrupt after power failure

2012-10-04 Thread Rick James
On Linux, XFS is preferred. Noop or Deadline, not CFQ is preferred. I don't know if any of this has any impact on the crash you describe. I am quite suspicious of VMs. > -Original Message- > From: Andrew Miklas [mailto:and...@pagerduty.com] > Sent: Thursday, October 04, 2012 3:21 PM > To

Re: user last activity and log in

2012-10-04 Thread Claudio Nanni
Hi, 2012/10/4 Reindl Harald > > > Am 04.10.2012 17:28, schrieb Aastha: > > I want to find the last time the given list of users logged in. > > Is there any mysql table from where i can retrieve the data or any > > specific sql > > no - because this would mean a WRITE QUERY in the mysql-database

Re: InnoDB corrupt after power failure

2012-10-04 Thread Andrew Miklas
Hi Rick, On Oct 4, 2012, at 2:40 PM, Rick James wrote: > I hope you turned OFF caching on the drives, themselves. The BBU should be > the single place that caches and is trusted to survive a power outage. The DB server in question is running in a virtualized environment, so the array shows up

RE: InnoDB corrupt after power failure

2012-10-04 Thread Rick James
I hope you turned OFF caching on the drives, themselves. The BBU should be the single place that caches and is trusted to survive a power outage. > -Original Message- > From: Andrew Miklas [mailto:and...@pagerduty.com] > Sent: Thursday, October 04, 2012 2:16 PM > To: Manuel Arostegui > C

Re: user last activity and log in

2012-10-04 Thread Reindl Harald
Am 04.10.2012 23:12, schrieb Johan De Meersman: > - Original Message - >> From: "Reindl Harald" rei...@thelounge.net> >> >> it does not matter what kind of users > > I'm happy for you that you still have all the answers anyone could ever want, > Harald. not all but the one to the topic

Re: InnoDB corrupt after power failure

2012-10-04 Thread Andrew Miklas
Hi Manuel, Thanks for the fast reply. On Oct 4, 2012, at 12:05 AM, Manuel Arostegui wrote: > it shouldn't be a biggie if you have a BBU. Do you guys use HW RAID + BBU? We've checked with our hosting provider, and the database was indeed stored on a BBU RAID. > What's your innodb_flush_log_at_

Re: user last activity and log in

2012-10-04 Thread Johan De Meersman
- Original Message - > From: "Reindl Harald" rei...@thelounge.net> > > it does not matter what kind of users I'm happy for you that you still have all the answers anyone could ever want, Harald. Regardless of having any background knowledge on the circumstance of the question, even. You

Re: user last activity and log in

2012-10-04 Thread Reindl Harald
it does not matter what kind of users usually each application has it's own datanase and it's own user, the application makes the connection and can at this point log whatever you want using the "general query log" can only be a bad joke you will log EVERY query and not only logins again: it is

Re: user last activity and log in

2012-10-04 Thread Aastha
Yes, i meant DB users. On Thu, Oct 4, 2012 at 10:57 AM, Johan De Meersman wrote: > > - Original Message - > > From: "Reindl Harald" > > > > this makes pretty no sense and is NOT the job of a RDBMS > > implement it in your application / db-abstraction-layer > > I notice no specification o

Re: user last activity and log in

2012-10-04 Thread Johan De Meersman
- Original Message - > From: "Reindl Harald" > > this makes pretty no sense and is NOT the job of a RDBMS > implement it in your application / db-abstraction-layer I notice no specification of what kind of users, so I'm assuming DB users. There *is* such a thing: you can find it in the

Re: user last activity and log in

2012-10-04 Thread Singer Wang
It is possible in MySQL 5.6 S On Thu, Oct 4, 2012 at 11:30 AM, List Man wrote: > There is no such thing. Your application has to deal with such info. > > LS > > > On Oct 4, 2012, at 11:28 AM, Aastha wrote: > > > Hello, > > > > I want to find the last time the given list of users logged in. >

Re: user last activity and log in

2012-10-04 Thread Reindl Harald
Am 04.10.2012 17:28, schrieb Aastha: > I want to find the last time the given list of users logged in. > Is there any mysql table from where i can retrieve the data or any > specific sql no - because this would mean a WRITE QUERY in the mysql-database for every connection - having a web-applicat

Re: user last activity and log in

2012-10-04 Thread List Man
There is no such thing. Your application has to deal with such info. LS On Oct 4, 2012, at 11:28 AM, Aastha wrote: > Hello, > > I want to find the last time the given list of users logged in. > Is there any mysql table from where i can retrieve the data or anyt > specific sql > > > Aastha G

user last activity and log in

2012-10-04 Thread Aastha
Hello, I want to find the last time the given list of users logged in. Is there any mysql table from where i can retrieve the data or anyt specific sql Aastha Gupta

Re: (real) silly question about variables...

2012-10-04 Thread MAS!
> what version of MySQL are you running? I get this:- mysql> select version(); +---+ | version() | +---+ | 5.1.63-0+squeeze1 | +---+ I'm asking that because I have a trouble with a select.. I have something similar.. SELECT @sec:=IF(GROUP_C

RE: (real) silly question about variables...

2012-10-04 Thread Martin Gainty
in a mySQL statement the values are displayed BEFORE assignments are made Ciao, No MAS __ Per f

Re: (real) silly question about variables...

2012-10-04 Thread rich gray
On 04/10/2012 15:52, MAS! wrote: Hi I know there'd be a reason, but I can't understand that.. mysql> select @valore:=rand(), @valore, @valore:="ciao", @valore; +---+---+-+-+ | @valore:=rand() | @valore | @valore:="ciao" | @val

Re: (real) silly question about variables...

2012-10-04 Thread Derek Downey
Hrm, what version of MySQL? I just ran the query on 5.5.24 and it worked as expected. - Derek Downey On Oct 4, 2012, at 9:52 AM, MAS! wrote: > Hi > > I know there'd be a reason, but I can't understand that.. > > mysql> select @valore:=rand(), @valore, @valore:="ciao", @valore; > +

(real) silly question about variables...

2012-10-04 Thread MAS!
Hi I know there'd be a reason, but I can't understand that.. mysql> select @valore:=rand(), @valore, @valore:="ciao", @valore; +---+---+-+-+ | @valore:=rand() | @valore | @valore:="ciao" | @valore | +---+-

Re: InnoDB corrupt after power failure

2012-10-04 Thread Manuel Arostegui
2012/10/4 Andrew Miklas > Hi guys, > > I recently had a data corruption issue with InnoDB. MySQL was shut down > improperly (power failure), and when the system came back up, MySQL refused > to start. On inspection of the logs (see below), it looks like the > tablespace became seriously corrupt