@# 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 17 18 19 20 21 22 23 24



Comments:

<0> And, in examining your query, it all makes sense. I'm having a 'DOH!' moment.
<1> \monster\ : How do you sort your user table?
<2> inviso
<2> I need help tho ! :(
<2> You still around? Can I bother ya?
<2> lol
<3> Everyone went home.
<3> Ah. Personal request.
<2> Xgc
<2> I've got some data (a string) 19870719-0297
<2> I want it as DATE
<2> oops.. I mean 19870719
<2> how do I convert it? string_to_date dont work
<1> No luck with the date arithmetic?
<4> '19870719' should be a valid date if the context requires a date
<1> I thought so too.



<2> nvm
<2> CareBear\ you were right
<2> I was just tired
<2> and messed something up
<2> lol
<1> Oh? It's working? Goodie. :)
<2> yeh :)
<2> CareBear\: If I made a dump of my DB structure.. could you look at it and tell me if anything else is inefficient?
<2> or perhaps its too much to ask? :p
<1> I'm watching a rerun of the Simpsons, I might as well have a look, but I can't promise anything.
<1> Any results, that is.
<2> ok
<2> I'm DCCing it to you then, CareBear\
<5> Hello. I have a database here, inserting into it says the table is read only. How do make it read write?
<1> No pastebin?
<2> oh I can pastebin it
<1> Please do.
<2> http://pastebin.com/581280
<1> Trixsey : Looks pretty ordinary..
<2> k.. nothing major then
<2> *puh*
<2> :)
<1> Trixsey : Only suggestions I can offer after just a glance is that varchar is worse than char.
<2> it is? ok
<2> I can just switch tho, right?
<1> Probably, yes. Also text is "bad" but sometimes you need the space.
<1> I also make sure to always have id and similar ints unsigned to save on the decimal sign, I never use negative numbers anyway.
<1> char and int with variations are always stored with fixed lengths in the file, so each row is always of constant size.
<4> stevenm: is there a errorno behind the error message?
<2> CareBear\: whats UNSIGNED mean?
<1> Trixsey : Only positive numbers
<2> oh ok
<2> and the diff between CHAR and VARCHAR?
<1> And zero.
<1> Some difference in how they're padded, but more important is that varchar is a variable-length column that can get fragmented and stored all over the file on disk.
<2> ok?
<1> With only fixed-length columns in a table each row has a fixed size and MySQL can use that to optimize a lot of disk access.
<2> oh
<2> ok
<2> but my strings vill vary alot in length
<2> will it fill the other bytes with zeroes then?
<2> or w00t?
<1> I think char pads with spaces, but they're removed automatically.
<2> ok
<1> The column type section of the manual is good recommended reading, the different types and their properties are described well there.
<2> ok
<2> thx a bunch
<1> No problem.
<6> where are mysql databases stored? im using gentoo linux
<7> SHOW VARIABLES LIKE 'datadir';
<1> signature : /var/lib/mysql I believe
<2> CareBear\: I don't need ZEROFILL on all my int cols, right?
<1> No, no, just the one you wanted for the counter value.
<2> yeah
<2> just checking :)
<8> is the root user in mysql same as root account on the localhost system?
<2> seems I can't just swap from varchar to char
<7> evolocus: they have nothing, really, to do with each other.
<8> Therion, okay, does the root user of mysql have a p***word already set up?
<7> evolocus: default installation does not create a p***word for it; some distributions have installations that let you pick one, but you would know if you had picked one, eh?
<8> yeah I did not



<8> I connected to the server like this: $mysql -u=root
<8> and it let me in
<8> now I want to create regular users, so I did this:
<7> you logged in as "=root"
<8> mysql > CREATE USER vikram;
<7> which got in via the anonymous login for localhost
<7> mysql -uroot
<7> SELECT CURRENT_USER();
<2> CareBear\: UNSIGNED save any space? or just to make sure you dont accidently put a negative number?
<7> it gives you another bit which increases the maximum positive range of values that can be stored
<8> is that select current user command to view what user id you're using currently?
<7> !spill 2**31
<7> !spill 2**32
<9> 2147483648L
<9> 4294967296L
<7> AHhh the difference a single bit can make
<7> evolocus: to show which login is being used to control your privileges
<7> evolocus: "yes"
<2> Therion: Is there a way to swap from VARCHAR to CHAR?
<8> Therion, okay, thanks. I did login as root then. Now I am trying to create a regular user account: mysql > CREATE USER vikram;
<8> it says error 1064
<7> Trixsey: CREATE TABLE t1 ( a CHAR(10) ); ALTER TABLE t1 MODIFY a VARCHAR(10); SHOW CREATE TABLE t1;
<7> evolocus: CREATE USER is for MySQL 5.0
<7> evolocus: Presumably you do not have it
<8> I have 4.0
<7> You want a GRANT statement
<7> It will create the login if it does not already exist
<7> Or you want to upgrade to 5.0
<2> Therion: I got data stored as VARCHAR already... tried to change in phpMyAdmin but it wouldnt do it
<8> like this? -- mysql > GRANT ALL PRIVILEGES ON *.* TO vikram@localhost WITH IDENTIFIER myp***word?
<7> Trixsey: Can't help or explain phpMA's behaviors
<2> ok
<7> evolocus: Not sure what "WITH IDENTIFIER" is supposed to mean
<7> evolocus: WITH P***WORD 'yourp***word' yes
<8> oh okay, I remembered it incorrectly
<8> thanks, let me try
<4> evolocus: identified by
<7> HEy there we go
<8> lokus, Therion, it is still giving me error 1064
<7> I'm the one smoking crack
<7> IDENTIFIED BY 'yourp***word'
<2> Therion: Think I should do UNSIGNED floats if I know the float wont/shouldnt ever be negative?
<7> !kick therion idiot!
<2> LOL
<2> Therion: Think I should do UNSIGNED floats if I know the float wont/shouldnt ever be negative?
<7> Trixsey: If you feel so inclined
<10> HAH
<7> Trixsey: You should also consider using DECIMAL instead of FLOAT if you decide you care about precision
<2> Therion master, would you?
<8> GRANT ALL PRIVILEGES ON *.* TO vikram@localhost WITH P***WORD myp***word
<2> ok
<8> gives 1064 error
<7> evolocus: IDENTIFIED BY, not WITH P***WORD
<7> evolocus: as lokus said
<8> I did that
<8> same result
<7> Quote your p***word, as I said
<8> oh
<7> said/showed/demonstrated
<7> wrote
<7> communicated
<7> conveyed
<7> expressed
<7> !kick Therion SHUT UP
<8> alright alright :D
<8> lol
<7> It's Been A Long Day <tm>
<1> I had a 36h day yesterday, still recovering.
<7> I wonder where I got "WITH P***WORD", hmm
<7> Odd for me to just make up something like that
<8> okay Therion, lokus, it worked now
<8> how can I check how many users exist?
<2> Therion: DECIMAL(10.0)


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#qemu
perl -e print AAAAAAAA
irtrans fedora fc5
beepmp fedora
#mysql
ubuntu network-admin su
#fedora
#suse
ubuntu re-detect soundcard
#css



Home  |  disclaimer  |  contact  |  submit quotes