| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> no go. <1> domas: mysqld_safe has no basedir paths hardcoded does it? <2> so i try to login to mysqladmin, but i can't get in :( <1> what's the error? <1> arooni: you login with "mysql" <1> "mysql -u root" <2> that did it leith! <2> what does the -u option do <3> Leith: binary iirc <1> arooni: "User" <4> ok, it's time to downgrade to 4.1... :( <0> Leith: take a look... http://pastebin.com/740862 <2> leith: what does setting session do <2> leith: only when mysql is currently runnin, then it'll forget about things? <1> arooni: yes, for the current session <1> arooni: either set it in the script that is uploading the blob, before the upload, or set it globally
<2> leith: do i have to set it for *all blobs* just one <2> leith ahh i see <1> set it once, as long as they are part of the session <1> or, if you do it over multiple sessions, every time <2> leith: what does it have it set to by default <1> marc7: wat I find weird there is the timestamps don't match <0> sorry <1> weird <0> no no <0> i had tried starting it several times <0> and so in the cat command, I just copied the first three lines... but there's another 20 lines of that same thing happening <2> leith: using SET GLOBAL max_allowed_packet = 2000; resulted in: "ERROR 1064 (42000): You have an error in your SQL syntax, check manual" <1> yea sure <0> i could've used tail on the file, and it would've shown more recnt. <1> arooni: you on 4.0? <2> leith 5.0 <1> arooni: you surely want more than 2000 bytes <1> which is less than 2kb <2> leith: no <2> leith: i'm silly <2> and messed up <0> Leith: any idea? :P <2> leith: but even with 2 megs, i still get the same error <1> marc7: trying to think what would cause it to say it's starting everything in the right directory, and then to just use binaries from another directory <1> marc7: can you invoke mysqld directly instead of mysqld_Safe <0> yeah <0> i think it'll come to that. <1> mysql> SET GLOBAL max_allowed_packet = 2*1024*1024; <1> Query OK, 0 rows affected (0.19 sec) <1> marc7: just for now, to see if it does something different <2> leith: i was sstupid and forgot the = sign <2> maybe its time to go to sleep :( <1> herh <1> possibly ;) <2> Leith: so i made that change... and my pictures are still getting cut off :( <1> any mysql error this time? <1> brb <2> leith: i mean no mysql error... it just accepts the blob but truncates it <1> something wrong elsewhere then <1> perhaps your script? <1> how are you uploading it? <2> hang on eclipse was taking 165MB of ram and all my procsesor trying to tail the log file <2> better believe i shut that puppy down <0> *hangs head* <0> i'm not cool with having wasted three hours on that <0> but thank you Leith, invoking mysqld directly did the trick. <2> ok leith: now i got the same error... i uploaded a file that was like 1 meg... and its like mysql got confused, and then went away cuz it couldnt handle the pressure <1> that doesn't help me :P <1> *how are you trying to upload it* <5> hello <5> whats the besta way to convert a string field to number? <2> leith: i'm using rails to generate a form that is multipart <1> ALTER TABLE <6> lol generally mysql goes away because you are not asking it to do anything :P <2> leith: then i go ahead and send it in to the blobby, but mysql goes away <2> who ever heard of a server doing that to you!?! <2> 'ah i'm sorry arooni, this is too much for me, i'm going to go away now' <1> check the error log for any hints <5> Leith: no, sorry, i mean to convert a string result to a number <1> sounds like max_allowed_packet again, though
<1> sal: add 0 to it <2> leith: now what i did when i set that, was i connected to my development database <1> sal: or CAST it <1> arooni: SHOW GLOBAL VARIABLES LIKE 'max%'; <5> Leith: but cast requires an extra parameter for character mapping <2> leith: max_allowed_packet is set at 1048576bytes <1> sal: so just add 0 <1> (stringcol + 0) <2> 1024 * 1024 = 1 meg <1> how big is the image? <5> leith: is that standard or only mysql way to do it? <2> leith = i think it was larger... but i set it to be 2 megs earlier with your command <2> why would it revert <1> I think most databases would do an explicit cast <1> arooni: you not setting it correctly <1> arooni: or, doing it on a different server :P <2> leith: user error huh ? :p <2> leith: ok it is definitely set to two megs now, but i try again, and it stops storing it after it gets to be 64 kb <1> what column type do you have? <2> leith blob <1> !m arooni column storage requirements <7> arooni: (Column Type Storage Requirements) : http://dev.mysql.com/doc/mysql/en/Storage_requirements.html <1> go see how large a BLOB is ;) <1> then perhaps look at MEDIUMBNLOB <1> and LONGBLOB <2> damn BLOBBIES <2> leith : what is L in this <1> "Large" <1> "Binary Large Object" <2> leith : i'm having trouble calulating the size of a BLOB , MEDIUMBLOB, and GIGANTIC BLOBBY <2> maybe cuz i'm tired <2> see 64 = 2^6 <2> so L = 6? <2> no, L = 4, <2> they say on BLOB that it's L + 2 bytes <2> damn i'm confused <2> i got it now <2> MEDIUM_BLOBBY ATTACK!!! <1> 2^16=~64k <1> go to google and type "two to the power of sixteen?" or "2^16?" <6> well it is exactly equal to 64k if you use k = 1024 :P <1> or..you know...use a calculator ;) <1> andrewbryson: well yea ;) <1> I was going to put ~65000 bytes but couldn't be bothered ;P <2> leith: ok heres the next problem... it uploads files that are 300kb or so... <6> might as well just say 65534 and see if anyone notices <2> leith: but when i tried one that was a 1MB, it died again, then went away <2> and i even tried using longblob <1> andrewbryson: heh I think the crowd in here may get confused :P <6> :P <2> its borken again :( <1> sounds like a max allowed packet yet again <1> raise it real high <1> 64*1024*1024 <2> lieth: that did it <2> leith: but strangely enough, when it was at 2M trying to upload a 1.13MB file, it choked <1> I always raise it twice the size of the blob I'm going to need <2> leith: any reason why? <1> just the way blobs are handled <1> makes life easier <1> they are fully loaded in to memory and then dealt with <1> there is no "streaming" <2> if you anticipate a lot of photos being uploaded, would you put them in db or just sit them on disk <1> on disk <3> on super-duper-mega-CAS-storage <3> :(((( <2> why on disk as opposed to the db? <3> !tell us about images <7> domas asked me to tell you this: Using Images in BLOBs: http://www.hashmysql.org/index.php?title=Using_Pictures_in_BLOBs ---- Move to Store Images in the Database: http://www.oracle.com/technology/products/intermedia/htdocs/why_images_in_database.html (Thanks xah) <3> um, there was nice Kristian's post on planet <2> thanks domas <2> i think for now, storing photos in the db is simple <3> it is <2> if my app gets crazy, i'll have to worry about scaling
Return to
#mysql or Go to some related
logs:
Broken runlevel entry #centos #math sssh behind a router #mysql sbcl compile-file standalone without runtime #linux You must have the MySQL PHP module installed gentoo get printer counter #linux
|
|