@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16



Comments:

<MyQuiL> will: well, I just didn't expect to have to dump the mysql schema too to do it.
<MyQuiL> (I admit, I'm a mysql hater) I'm used to Postgres when you dump, you get all the GRANTS too, it's not in another schema
<will> What you are asking for is a "point in time" info. Your original GRANT may not be what it is currently.
<MyQuiL> curious.
<will> Because you could make other modifications, directly to the mysql.user table.
<will> MySQL, or any other application, would have to create a new GRANT
<acidjazz> hi
<will> ho
<MyQuiL> well I don't exactly love that you can do that either, but a valid point.
<MyQuiL> so if/when I load the mysql schema from a dumpfile, I just have to do a Flush privs right?
<MyQuiL> and then I'm all good?
<will> Can't love anything 100%, not even your wife.
<will> Yep
<acidjazz> so i have a table w/ phrases in it that i dont want duplicate phrases in, would it make more sense to verify the phrase is unique in PHP? or make the field unique in mysql?
<will> Not too hard.
<will> acidjazz, Both
<will> I prefer to have PHP check. To save a trip to the DB.
<will> Err
<MyQuiL> cool. I think I now have enough to fully-script a replication slave bringing itself up from ground-zero
<will> I prefer to have PHP check. So I don't have to have "errors" in key violations.
<will> MyQuiL, Nice :)
<will> I really need to start using replication.
<MyQuiL> will / acidjazz : Proper DB theory should say soemthing like the DB engine can always do things more efficiently than your application code can
<MyQuiL> will: it's about 6 lines of SQL to do it.
<will> To do what? Check the DB? or replication?
<MyQuiL> I'm setting everything up here so that the nodes all come up with id=1 and read-only, and then via scripts you tell it what id and role it will have
<MyQuiL> replication, much simpler than the dox
<will> That's nice
<will> I've never needed to use replication. Even now. But I want to try it out.
<MyQuiL> well our experience with clustering for horrible. damn thing would just make the schema disappear after a while.
<acidjazz> i guess text fields cant be unique?
<will> Definately not need clustering... heh. If our business needed that, I would be able to hire people to implement it.
<will> acidjazz, It can. Just the first part.
<will> That's a lot of work for a DB to check 65k characters to see if it already exists...
<albo> is there a way i can get mysql to not transmit in gzip
<will> It transmit in gzip?
<will> When?how/
<will> ?
<albo> 10.40.1.3:3306 -> 10.40.2.2:53273 [AP]
<albo> ....]..x..T[O.A.=?m??V...?Z.?rQ...|?
<SpComb> pull the plug on the mysql server. then it won't transmit in gzip anymore
<Hal9002> hello! i have a table with 4 rows, and am doing a query with its conditions etc... but i want to avoid to get results which have the same value in a specific row... how do i specify that in the query?
<albo> Hal9002: distinct(rowname)
<mendel> albo: MySQL uses its own protocol, not necessarily plain text. You can't read a MySQL session by looking at the tcp stream.
<Hal9002> thanks :)
<will> Are you sure that is Gzip?
<archivist> why is albo ***uming that is gzip
<will> Should be binary... like it's log.
<alphablue> he speaks gzip but not fluently
<will> I honestly thought it would have been cleartext...
<will> Except for authentication.
<SpComb> who is MyQuiL?
<alphablue> albo: how are you talking to mysql ?
<alphablue> it's yourQuil
<will> That guy.
<mendel> I took a course to speak gzip once, but they really crammed too much into the available time, so I didn't get much out of it.
<SpComb> yeah
<albo> YourSQL
<will> mendel, lol
<alphablue> mendel++
<MyQuiL> (I just thought it was fair)
<will> ok
<ndee> hello there, I'm currently working on a shop solution. The shop consists of 3 different product categories(books, audiobooks and software). The product table contains all attributes which are the same on all those 3 different categories. The books, audiobooks and software table contain specific fields for that category. Now, I want to make a statement which gives me actually, depending on the category, all details for a product. (will continue..
<alphablue> looks like homework to me
<mendel> will: go ahead, continue
<ndee> now, would you guys go thru each categories and pick out the fields or would you make a big join statement, joining somehow all 4 tables together?
<Hal9002> albo: can i make a combination of two columns distinct?
<ndee> to me, it seems like I would have to go thru each category seperatly because the big join statement recordset wouldn't look so nice because it would have alot of empty fields.
<alphablue> hopefully no arrest warrants
<sjrussel> I'd store the sub-type records in a LONGTEXT on the products table in gzipped CSV format
<archivist> I did that once and found myself as an author
<will> mendel, With?
<SpComb> hmm
<sjrussel> albo can help you with the gzipping part
<alphablue> lol
<mendel> will: ndee asked you to continue up there. :)
<ndee> sjrussel: would you in general not split up the different categories onto different tables?
<ndee> mendel: lol, nah, I meant to write "will continue with writing"
<mendel> I know :)
<ndee> sjrussel: ah ;)
<SpComb> nothing too interesting
<ndee> kk, my sarcasm/whatever-meter needs to be recalibrated,
<SpComb> couple hits on blogs, a couple random sites of mine, and the rest irc logs
<sleek> is there a way to do a WHERE clause that uses IF ?
<acidjazz> how do i do something like this :
<acidjazz> UPDATE salesrep a set a.group_id SELECT b.id from salesrep_group b where b.name = a.company_name;
<ndee> I think I will go thru each category. I need to output it in an email
<will> mendel, oh lol...
<afragen> Hi all, I have a real newbie question and problem.
<Tocano> mendel: Don't know if you remember, but I asked you earlier today about my /var partition being almost full.
<SpComb> SELECT * FROM foo or die("Query failed");
<Tocano> I ran lsof as you recommended and it showed some ~250 instances of mysqld.sock open.
<Tocano> After hours, I did a soft restart of the mysql daemon and it instantly cleared up the problem.
<afragen> I was having a problem with an 4.1.12 install and updated to 4.1.18 but didn't export the db
<afragen> now I can't access it.
<will> Error?
<afragen> I'm on OS X and the previous install with data folder is there
<Tocano> Any ideas why running mysqld for awhile without restart would cause the sockets (or whatever) to begin to eat up disk space?
<mendel> tocano: You saw one per thread, but that wouldn't have been what took up the room -- one of those must have held open a big temporary disk table or something.
<afragen> how do I import the old data
<mendel> Woos
<mendel> Also: Woops
<will> afragen, The upgrade should have been seemless. Should have worked. What is the error message?
<SpComb> Woo? Who?
<mendel> When mysql needs to do temporary operations on disk, it creates the file and immediately unlinks it, so it just has an fd open to it
<mendel> That makes it really hard for something else to delete :)
<afragen> no error message, but the old databases aren't present
<Tocano> ahhh
<mendel> But it also keeps the space occupied until the fd is closed
<mendel> When you look at mysql in lsof output, though, keep in mind that each "process" is just a thread of one process
<Tocano> right
<mendel> (which explains why it looked like there were a lot of sockets open)
<Tocano> Well, apparently, over long enough period of time, those add up ... significantly
<ndee> afragen: someone's hungry...
<mendel> tocano: MySQL doesn't (well, shouldn't) hold them open when it's not using them, though.
<will> What a girlie.
<afragen> hungry?
<Tocano> mendel: Well, I am still on 4.0.22, so maybe it's a small bug.
<ndee> afragen: it was just a bad joke
<afragen> no problem
<Tocano> mendel: Either way, thanks for the direction. That helped me find it.
<mendel> np
<afragen> so, how do I restart the mysql server to point to my old data folder?
<will> afragen, Edit the my.cnf file.
<afragen> will: I know I can find the my.cnf file but what precisely are the edits I need
<jjb_lyceum> how do i do string concatenation in a mysql query
<afragen> will: currently my.cnf has
<afragen> http://rafb.net/paste/results/u1NVE454.html (4 lines of Plain Text)
<afragen> brb
<jjb_lyceum> such as SET options.option_value='http://demo.lyceum.ibiblio.org/' . blogs.slug
<jjb_lyceum> i'm guessing it's not a dot like in php...
<will> datadir?
<will> !m jjb_lyceum string functions
<SQL> jjb_lyceum: (String Functions) : http://dev.mysql.com/doc/mysql/en/String_functions.html
<jjb_lyceum> will: thanks
<jjb_lyceum> brilliant.
<afragen> back
<will> front
<rado1> is there anyway to run mysql commads from a bash shell?
<will> Yes
<rado1> oh?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

all-eye installer
centos dedicated epassporte
ubuntu hpt374.ko
aochat python
#css
#oe
aoss not working dapper
#lgp
#php
#perl



Home  |  disclaimer  |  contact  |  submit quotes