Brisson: But I don’t apriori know what the database names are
Bradwell: They follow a regex pattern, but are dynamically created
Clyatt: Misdicorl: Sounds like awful appliaction desing
Divin: Hello everyone, I am using the join “LEFT JOIN SELECT MAXt.posted AS last_post, t.user FROM posts t WHERE post != “fail” GROUP BY user ORDER BY posted DESC AS p ON p.user = ur.id” to get the latest date, but the problem is it joins hundreds of rows each time, how can I make it more efficient and so I don’t have to set SET SQL_BIG_SELECTS=1?
Topel: This isnt the primary use case
Soland: Very much an edge case
Clyatt: Marcus1060: If you want signle row why are you selecting multiple rows?
Clyatt: Marcus1060: And why that ORDER BY there? It does nothing
Glandon: Salle: How can I make it return only one row? I can’t use ur.id in the sub query to get only the row I want for each user.
Clyatt: Marcus1060: . GROUP BY user .; means it returns one row for each user
Camareno: Salle: Yes, but how can make it only return the row for the user I want?
Clyatt: Marcus1060: Learn SQL
Gallaty: Salle: That is incredibly helpful thank you.
Torda: Can anyone else help me? My subquery returns for each user, I can’t use a value from the main query in a subquery to narrow it down right? Is there a better way to get the max value of a row for each user?
Gossard: Marcus1060: Most implementations of sql don’t allow the mixing of grouped and ungrouped columns in the SELECT clause. mysql does, but the row selected for the ungrouped column is an unpredictable value. The groupwise max solution is a way to specify the value selected for the ungrouped column.
Tremayne: Marcus1060: http://jan.kneschke.de/projects/mysql/groupwise-max/ http://dev.mysql.com/doc/refman/5.6/en/example-maximum-column-group-row.html
Sliney: Everytime I update my mysql root p***word and log out, it doesn’t save the p***word.
Sliney: I tried following these steps: http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-p***word
Sliney: I was able to login once but then when I logged out and tried to log back in, the info wasn’t saved
Decoux: Sliney: how do you know it’s not “saved”?
Alexandropoul: Sliney: Stop the mysqld server, add ‘skip-grant-tables=1’ to my.cnf under mysqld, start the mysqld server, connect using ‘mysql -u root’ and do ‘use mysql;’ then do ‘UPDATE user SET P***word = P***WORD’new_pwd’ WHERE User = ‘root’ AND Host=’localhost’;’, clean up my.cnf and restart the mysqld server, test with ‘mysql -u root -p’ by entering your new p***word at the prompt. threnody
Sliney: That seems like a more legit way. the way I was doing it, I saw some errors
Sliney: Related to mysqld double free or corruption
Clyatt: Sliney: That rackspace article does exactly the same.
Sliney: Bachinski: as soon as I log into mysql -u root, I get this shortly thereafter: http://pastebin.com/raw.php?i=nEJQhh3K
Sliney: Was able to get that command to run and it said the rows matched 1, changed 1.
Sliney: That backtrace keeps running as long as I’m signed into mysql
Bachinski: Sliney: did you do USE MYSQL; first? did you actually type SET P****** ?
Sliney: Ugh, now mysql is dead with a lock file
Bachinski: Sliney: I have no idea what ‘glibc detected ***’ means
Sliney: Server environment variable
Hudgins: Is there a quickie that will convert a cron job time stamp into something I can sort by to get a bunch of rows in chronological order? I want something like 0 39 20. to show up before 0 0 21.
Colella: And I’m limited to the mysql prompt I think. Maybe I can use bash, but I’m not sure at this point.
Bachinski: Craigb***76: https://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_str-to-date
Senko: Bachinski, I don’t think so. I may have to give it a whirl in bash
Lashlee: Is there a way to get minimum status_id from current resultset, without doing another query?