| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10
Comments:
<0> In all honesty, MySQL doesn't know what marble was put in last. You have to 'tag' it somehow, like an autoinc or timestamp. <1> the last INSERT INTO tabla (col1, col2, ...) VALUES('valor1', 'valor2', ...); <1> ok <2> hmm.. <2> well what you can do is... use search max id <2> since you have it auto increment <2> the max id must be your last entry since it goes up when you add a new entry <0> !man last insert id <3> (How to Get the Unique ID for the Last Inserted Row) : http://dev.mysql.com/doc/mysql/en/Getting_unique_ID.html <0> Also look at that. <1> thanks for all <4> Hello people <0> Hello aliens <4> :-) <4> I have a p***word question, if you please, regarding the old-vs-new scheme <0> WHAT ABOUT IT?
<5> your question-withholding abilities frighten and excite me <6> Hi Darien :) <0> RUN DARIEN RUN! <4> I have a database with p***words stored using the p***word() function. most of them were generated under MySQL 4.0 with old-p***words, and some with the new p***word() call <4> I'm using pam-mysql for authentication, and with some trickery I can get both types to auth correctly <4> now the problem - how do I do the same in plain SQL ? <0> oh baby <6> :O <6> omfg <5> wait a minute <7> quit stalking me, Daveman <5> do NOT tell me you're using p***word() outside of setting the p***word for MySQL users <6> You stop stalking me! <6> plus I don't even like you, infibot :) <6> heehee <6> haha Darien :P <6> they triiiiiiiiiiiiicked youuuuuuuuuuu :P <4> anybody ? <6> haha, silly noobs :) <7> DELETE Daveman FROM #mysql; <5> Guss77: dude, I just addressed you <6> infi, p***. <5> Guss77: are you using the p***word() function outside of the mysql.users table? <6> infi: and fyi, you need to unlock the row(s) in question first, noob. <6> ;p <4> I am. why ? <7> heh <5> DO NOT DO THIS <5> !m Guss77 p***word <3> Guss77: (Access Control, Stage 1: Connection Verification) : http://dev.mysql.com/doc/mysql/en/Connection_access.html <4> sorry - I'm terribly lagging. <4> yea, I know all about that <6> Darien, how's CPUnerd doing? :) <5> hmm <5> that's not what I wanted <5> anyway, the manual states very explicitly <5> p***word() is designed for use in the MySQL authentication scheme ONLY <5> it is NOT AN ACCEPTABLE P***WORD MECHANISM FOR APPLICATIONS <5> endcaps <5> for that you should be using MD5 or (preferably) SHA-256 <5> I don't mean to be a ****, but I must stress this very strongly <5> Guss77: I would strongly suggest switching to using SHA() for p***words <4> currently its not an option. I have a large userbase to maintain and I can't get them all to log in and change the p***word <5> you don't necessarily have to <4> ahmm. please explain ? <5> you could do it completely transparently <5> add another p***word column <5> then, when a user logs in, you check <4> no I can't because I don't have the cleartext <5> listen to me <5> stop talking <5> add another p***word column <5> when the user logs in you check to see if their row has an entry in the new SHA1 column <5> if so, you do a SHA hash and check that <5> if not, you check the old p***word format(s) <5> if those match, then the user is authenticated <4> hmm.. interesting. I actually don't need another column for that. (I currently use both new and old p***words in the same column. I can add sha1 or whatever) <5> now you have the cleartext, you generate the SHA1 hash, and then remove the old entries from the database <5> you could do that too
<4> problem is - I'd need to patch pam-mysql to do that :-( <5> why? <4> I don't think it has that option <5> to sha hash? <4> to do the update <8> is there an efficient way using sql to aggregate datetime values into 'hour' or 'day' bins? i want to aggregate values that may be added during an hour into an hourly total <4> basically - I have to wait for a user to login using the old p***word - they can only do this using pam-mysql currently. <4> so I have to "fix" pam-mysql to do the replacement for me. <5> aha <5> that's true <4> hmm.. or easier - I can get it to log the clear text and then have something analyze the logs and do the update myself. <5> true <4> heh - that would work :-) thanks ! <5> security implications <4> of course, always :-) <5> I recommend storing the data in memory for a while and then writing it to an encrypted file on disk <5> via gpg <5> but that's me <5> realistically, you could log to a line printer and no one would be the wiser <4> I agree with your security analysis, but that would be to much work to put in a simple hack <5> true <4> currently pam-mysql offers logging to a database table, so I can override that to log the clear text into a table only pam-mysql has write access and only me have read access. <5> nice <5> hey <4> cmorgan: you can use temporary tables for that <4> hey ? <8> Guss77: sure <5> you could use DES_ENCRYPT() and DES_DECRYPT() <8> Guss77: the question is how to get the time ranges <5> that only works if you have SSL support though <4> cmorgan: there are some useful date functions in the manuak <9> cmorgan: select hour(now()) <4> problem is, DES is almost clear text for anyone with a modern computer <10> cmorgan: group by date(created_date) ? <8> Xgc: i was planning to run this on a daily basis <5> Guss77: *almost* :p <4> although, probably not on texts as short as a p***word. <5> you could use AES <8> jpm_: works for grouping by hours? <10> sure, it's just sql <10> why wouldn't it <4> Yes - I can do that :-) thanks a lot ! <5> :) <5> use a binary p***word too, then they won't even be able to run 'strings' on the binary to get the p***word out to decrypt <5> unicode ftw <9> cmorgan: The point is you can group by that type of expression. <11> hello everyone, I have two tables, each post can have multiple pictures, i wanted to know if theres an easy way with few sql queries to grab the 15 most recent posts from posts and randomly select 1 picture thats ***igned to the same post_id is this possible with one sql query? <11> Table: posts (post_id, title, description, post_time) <11> Table: pictures (post_id, picture_id, filename) <8> Xgc: i'm not seeing it <9> cmorgan: SELECT ... FROM table1 GROUP BY hour(field1) <5> bedtime <5> Guss77: enjoy :) <4> thanks :-) good night <8> Xgc: that will group things from the same hour on multiple days right? <9> cmorgan: Yes. But you can add grouping fields, if you wish. <8> Xgc: right <4> Squee: I think so. IIRC Mysql has a rand function <8> Xgc: how to group by multiple things? group by date(datetimefield), hour(datetimefield) ? <8> Xgc: in the same query that is(sorry to be confusing) <9> cmorgan: That's the right form. <12> ) <8> Xgc: thats pretty neat. let me try that out. i was worried i'd need do issue dozens or hundreds of queries combined with logic on the client side(php server in this case), this looks nice <9> cmorgan: No need for that. <11> guss77: yeah there's a random function but how to do a sub query with a random query is where i have no idea. <4> Squee: heh - I can see your problem :). gimme a minute <11> sure thing. <8> Xgc, Guss77, jpm_: thanks for the help guys <4> Squee: you want a random row. thats the problem <4> I thought to use limit, but it doesn't accept function output <4> what I could do - of the top of my head, is make your query (with the right join) and dump it into a temp table with an additional row of random number, then get the highest random value. or something like that <1> ok i have a way for take only the last entry thank for all :) <4> but it sounds clunky. I'm sure there's a better way
Return to
#mysql or Go to some related
logs:
#perl opsec fedora outline dragging ubuntu Creative VF0040BP Linux linux restart the process if it dies #perl debian+smtpd_check_rules #math ubuntu uninstall vnc4server Gtk-WARNING **: cannot open displa
|
|