Brittman: 13:41 SmashingX in the table and the referenced table do not match for constraint.
Brittman: SmashingX: no problem, thanks for pasting us the answer! ;
Mcquiston: Trying to run a mysql from command line and I need to figure out how to limit my results to records created in the last 24 hours. Can someone please point me in the right direction?
Chaires: Robotojr: datetimedate -+ interval integer timeperiod; #where timeperiod is second, minute, hour, day, month, year and some others. No plurals! egs., ‘SELECT NOW + INTERVAL 3 MONTH;’ ‘SELECT CURRENT_DATE – INTERVAL 1 DAY;’
Danfield: Robotojr: got it figured out? you’ll use the INTERVAL in the WHERE clause
Bassetti: What is the best client from ubuntu do you advice me?
Schiffert: B100s: huh? “best client”? for what?
Ramsfield: Need to work interval into an existing sql query
Danfield: Robotojr: select a, b from t1 where datetime_col now – interval 24 hour;
Danfield: Robotojr: ask your qustions in the channel
Wilkison: How do I drop a user only if he exists?
Mallin: Lmat: See http://dev.mysql.com/doc/refman/5.6/en/drop-user.html
Ulcena: My app using API and exit abnormally, but the process in the server keep alive, what variable should i set to drop the process if the client disconnected?
Mavro: Https://mariadb.com/kb/en/mariadb/drop-user/ doesn’t seem to be working.
Lehigh: Lmat: Doesn’t work is not a helpful statement. Was there an error? Unexpected results? Does it sit on the couch all day eating all your cheetos and ignoring the cl***ifieds? Be specific!
Schiffert: Lmat: “In MariaDB 10.1.3, the DROP USER Risse was updated to: DROP USER IF EXISTS user_name”. are you trying to use DROP USER IF EXISTS? are you using MariaDB 10.1.3 or higher?
Deflorio: Kolbe: Sorry for the hold up
Demond: Kolbe: I ***umed I was using the newest version, but now that I look at mysql –version, I see 10.0.21
Schiffert: Lmat: there are several concurrent branches being released & maintained at any given time
Schiffert: Lmat: 10.1 is not yet GA
Branton: Well dang, so I need to create that crazy-ugly drop user if exists function.
Schiffert: Lmat: what sort of function?
Schiffert: Lmat: or just execute the DROP USER statement and handle whatever error it might give you .
Colston: Kolbe: a function like http://stackoverflow.com/questions/598190/mysql-check-if-the-user-exists-and-drop-it
Hackathorn: Kolbe: All the answers I’ve seen to this question involve a function, but I’m thinking that I don’t need to separate it into a stored proc.
Schiffert: I’m much more of the mind that it makes sense to try dropping the user if that’s what you want to do and then just see whether it worked or not after the fact :
Meli: Kolbe: That makes sense.
Schiffert: Writing and the maintaining some complex and non-standard function or procedure just to support that does not make sense to me
Keiter: No, no, write a SP to do this.
Keiter: It’s the sensible thing to do!
Little: Kolbe: I’m doing something like mysql commands.mysql; How do I handle errors in such a file?
Schiffert: Lmat: the standard thing is to just use mysql –force :
Ducay: Kolbe: But I want to know about other errors!
Schiffert: Lmat: then stop using an approach that makes it impossible to do realistic error handling
Pok: Kolbe: What’s the right way?
Richerson: Kolbe: I’m creating a script that drops a database, and recreates the schema and users.
Laramie: Kolbe: drops the database and users
Schiffert: Lmat: if you have a script that needs to do complicated interaction with the database, it would be better to use python or php or perl or whatever other thing you like that has a functional database API and the standard array of flow control mechanisms
Danfield: Lmat: why drop the user? users and grants are independent of the database existing