#mysql
06 November 2007
Total 30 pages. You are browsing page 2/30.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
00:42 <****> when I comment out the innodb_log_file_size line, the tables are back
00:43 <****> I have a datetime field, is there a way i can do an update in one query to add one month to the vlaue if the value is greater than right now(), otherwise set the value to now() + 1 month ??
00:45 <****> NOW(), NOW() - INTEVAL 1 MONTH, NOW() + INTERVAL 1 MONTH) WHERE .....
00:46 <****> Anveo: i improvised on the conditions because you said " add one month to the vlaue if the value" or set it to "now() + 1 month" which appear to me to be the same
00:46 <****> where is the my.cnf file?
00:46 <****> Siouxsie: likely /etc/ or /etc/mysql/
00:47 <****> chadmaynard: thanks alot, looks similar to what I was trying, perhaps I made a dumb mistake somewhere :)
00:47 <****> sorry. i forgot to mention i'm on Mac OS X. my mysql files appear to be in /usr/local/mysql but i don't see a "my.cnf"
00:47 <****> Siouxsie: Which OS?
00:48 <****> hi i am trying to use the migration toolkit, for exporting a database from sql server
00:48 <****> Siouxsie: /usr/local/etc/ ?
00:48 <****> Siouxsie: I do not know Mac OS, but try 'locate my.cnf'
00:48 <****> what should i put in username field of my source connection if i am using authentication for window only??
00:51 <****> i always get refused the connection with sql server
00:51 <****> Is the value in a varchar case sentitive?
00:51 <****> sander_: It depends on your charset
00:52 <****> How can I find out my charset?
00:52 <****> searched for "my.cnf" on entire hard drive and it doesn't exist for Mac OS X MySQL
00:53 <****> zonk, you know a place this is documented?
00:55 <****> Mmm, will have to check
00:55 <****> Siouxsie: so make it, :)
00:56 <****> sander_: Look in chapter 10 of the manual for 5.1
00:56 <****> heading Character Sets and Collations in MySQL
00:56 <****> how can i select something as a certain type, e.g. "SELECT SOMECOL *AS VARCHAR* FROM TBL"
00:56 <****> cast()
00:56 <****> Thlayli: Use a cast
00:57 <****> zonk: can you provide an example, please?
00:57 <****> cast(asdf as integer)
00:57 <****> I think
00:57 <****> thansk :)
00:57 <****> hi why does this throws and "column doesnt match value count at row 1?? http://pastebin.com/m3cb09087
00:57 <****> check teh manual for cast
00:58 <****> http://dev.mysql.com/doc/refman/5.0/en/dns.html
00:58 <****> How or where can I make this adjustment to "skip-name-resolve" in MySQL 5.0 on Mac OS X
00:58 <****> ?
00:59 <****> hi why does this throws and "column doesnt match value count at row 1"?? http://pastebin.com/m3cb09087
01:00 <****> fitoria: because you have 11 columns but only 10 values
01:00 <****> oh!
01:01 <****> anyone having problems conecting with migration tool? i can access fine with mysqladmin and query browser
01:01 <****> ToeBee:
01:01 <****> thanks
01:01 <****> which is exactly what the error message says :)
01:01 <****> jeje i am so stupid
01:01 <****> i get the following error: The connection to the target database could not be established (error: 0).
01:02 <****> !pastebin
01:03 <****> rafb.net/paste
01:04 <****> http://rafb.net/p/5vREvP57.html
01:06 <****> For anyone who was wondering about my earlier question, it seems it is related to the resizing of innodb_log_file_size: http://dev.mysql.com/doc/refman/5.0/en/adding-and-removing.html
01:32 <****> Just an out of the blue question, is the overhead difference big between 128 bit primary key field and 256 bit primary key field?
01:35 <****> minux: It can matter, so I guess that's a yes. I couldn't tell you how much though
01:36 <****> Would you really need 2^256 - 1 combinations as a PRIMARY KEY though?
01:37 <****> Well, I thought to use the same ID structure all over my system, for system languages, users, objects, extensions, permissions, anything that can be considered "object", "entity", etc...
01:38 <****> So the first 3 bytes specify date when the ID was created, the following 2 bytes specify ID type and the rest is the ID itself.
01:39 <****> err, wouldn't it be more efficient to have two columns, ID, and then created
01:39 <****> That way you can take advantage of auto_increment
01:39 <****> hi
01:39 <****> No, the date part in the ID is just to avoid duplicate IDs being created. :)
01:40 <****> if i wanted to delete more than one row in a table at the same time (other than looping through) how could i execute this?
01:40 <****> That's what auto_increment is for ;)
01:40 <****> testnick: Add a WHERE clause?!
01:40 <****> DELETE FROM foobar WHERE field = value
01:41 <****> so where foo=bar AND foo2=bar2 ect...?
01:41 <****> yes
01:41 <****> can i comma seperate values?
01:41 <****> minux: I understand why you want to do this but visually, having two columns would be easier to read and understand. I'm also pretty certain MySQL will be able to handle it internally better
01:41 <****> But I suggest you use Stored Procedures and parameters to avoid SQL injection.
01:41 <****> Question: Can the SHOW TABLE syntax support 'regexp' ?
01:41 <****> like foo=bar,bar2,bar3
01:42 <****> testnick: Yes, it's a special function like IN something though
01:42 <****> Just want to bring a discussion up. Waht character set and collation do you lot normaly use? and why? I'm just setting up a new database and having problems to choose between utf8_unicode_ci or utf8_general_ci...
01:42 <****> minux: Also, having the same ID over the database is a good idea, I use an UNSIGNED MEDIUMINT though (16 million values...)
01:43 <****> ok ill give it a shot
01:43 <****> thanks
01:43 <****> testnick: you can also list the IDs in a IN clause like WHERE foo IN (1, 2, 3, ... ,n)
01:43 <****> o is it "bar,bar2,bar3" or "bar","bar2","bar3"?
01:44 <****> LittleMan, it depends on the characters you want to support, but in practice you should be fine with either one of those charsets
01:44 <****> testnick: It's "bar1", "bar2"
01:44 <****> I need to "randomize" the dates in my database on a periodic basis (testing some article postings)... what is the best way to do this?
01:44 <****> ok
01:44 <****> thanks
01:44 <****> cross your fingers
01:46 <****> testnick: Have you looked at FIND_IN_SET() ?
01:46 <****> setuid: Use RAND()*(2^31 - 1) will give you a valid timestamp date (calculate 2^31 - 1 beforehand) and use a date function to put in a datetime column
01:47 <****> But in practice the unicode is sorted as the characterset it self and the general is a a little bit more general language collation or what? do you know?
01:48 <****> _Lemon_, The db has a datetime column, I think it'll be easier to do this outside MySQL with Perl and DBI... working on that now
01:51 <****> OK, I have a bit of a freaky one
01:51 <****> LittleMan: Well, surely a comes before b for both collations
01:51 <****> I made some changes
01:51 <****> to my config
01:51 <****> All seems fine
01:51 <****> setuid: It really is just a DATE_FORMAT function or something
01:51 <****> !man date functions
01:51 <****> (Year 2000 Compliance) : http://dev.mysql.com/doc/mysql/en/year-2000-compliance.html
01:51 <****> Not that...
01:51 <****> but then I needed to change a field in a table from unsigned to signed
01:52 <****> damn.. that was a punk
01:52 <****> I did a alter table mytable change `asdf` `asdf` int (3) ZEROFILL NULL
01:52 <****> had to create the my.cnf file as the root
01:52 <****> I get no error
01:52 <****> _Lemon_, I don't think I can sub-call the DATE_FORMAT function with RAND()
Total 30 pages. You are browsing page 2/30.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
