#mysql
29 September 2007
Total 14 pages. You are browsing page 5/14.
First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last
07:44 <****> hey all!
07:44 <****> sorry but i dont speak english
07:44 * chadmaynard wonders what genius551v's native language is
07:44 <****> spanish
07:44 <****> rendimiento
07:45 <****> I was just wondering.. Is there some simple MySQL way to get the 'latest' entry? i.e., In a column that increments, I want to find out what the last value was.
07:45 <****> !translate spanish english rendimiento
07:46 <****> orangey: you can select having max(auto_inc_field) = field or order by auto_inc_field desc limit 1
07:48 <****> chadmaynard: how do you feel about this: lock tables tbl1 write; \ select max(id) + 1 from tbl1; \ insert into tbl1 (blah, ....) values (fetched value, ....); \ unlock tables;
07:49 <****> orangey: what engine are you using?
07:49 <****> mysql with PHP
07:50 <****>. Tell me what something is
07:51 <****> ENGINE=MyISAM
07:52 <****> orangey: you should switch to an engine that supports transactions instead of trying to hack them in yourself.
07:52 <****> chadmaynard: is it an obstacle that I don't understand your statement? Or is it relatively simple to research and implement?
07:53 <****> orangey: SELECT version(); SHOW engines;
07:55 <****> chad: MyISAM, MEMORY, InnoDB, ARCHIVE, CSV, FEDERATED, MRG_MYISAM
07:55 <****> those are the yes-es
07:55 <****> I HAVE BEEN SUMMONED
07:55 <****> FEEL MY WRATH
07:55 * cythrawll wraths
07:56 <****> cythrawll: want a mint?
07:56 * proqesi` writhes
07:56 <****> no, but tabcomplete would be nice.
07:56 <****> since I have chad on highlight.
07:57 <****> I HAVE BEEN SUMMONED
07:57 <****> orangey: Inno supports transactions
07:58 <****> chadmaynard: The issue is a) I don't even understand what a transaction is; and b) I'm not trying to write elegant code, but something hackish to get the job done.
07:59 <****> so if you feel that the right thing for me to do is learn about transactions and implement them even here, then I shall.
07:59 <****> but if I can squeak by with a hack, I'm happy to do that I think.
08:00 <****> orangey: transactions aren't hard. Probably wouldn't set you back more than 15 or 30 minutes
08:00 <****> reasonable. Do you have a favoured source for an introduction?
08:00 <****> hi guys!
08:01 <****> whats the opposite of "insert into"?
08:01 <****> delete from?
08:01 <****> gardo: delete from
08:02 <****> or don't insert into
08:02 <****> i'm trying to delete some entries
08:03 <****> however, running "delete from" says i have an error in my sql syntax
08:03 <****> delete from phones (some data);
08:03 <****> where phones is the table
08:04 <****> show query
08:04 <****> orangey: sorry i didn't read that last line. The MySQL manual? I guess I don't : )
08:05 <****> !man transactions
08:05 <****> see http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-transactions.html
08:05 <****> !man transaction
08:05 <****> see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
08:05 <****> hmm
08:06 <****> stupid bot
08:06 <****> Horrible human
08:06 <****> :P
08:10 <****> chadmaynard, how can we grant permissions to all user, so that any can connect remotely in my.cnf
08:10 <****> rrrobert: did you remove those two lines?
08:11 <****> rrrobert: the grants are done from the mysql client, not my.cnf itself.
08:11 <****> the file looks like thishttp://pastebin.ca/719348
08:12 <****> chadmaynard, those lines arn't there
08:12 <****> rrrobert: I would remove old_passwords = 1; too
08:13 <****> rrrobert: is this CentOS or RHEL?
08:13 <****> CentOs
08:14 <****> rrrobert: just log into the mysql client and run the grant command. An example to grant all privs from any host (not necessarily recommended) would be GRANT ALL PRIVILEGES ON *.* to 'username'@'%' IDENTIFIED BY 'password';
08:14 <****> for more info see the grant section of the manual
08:14 <****> !man grant
08:14 <****> see http://dev.mysql.com/doc/refman/5.0/en/grant.html
08:15 <****> im not sure why centos is still putting old_passwords as default. I think it's madness
08:16 <****> Thanks.. man
08:30 <****> chadmaynard: playing a game with friends
08:31 <****> ToeBee: You can't just answer after that kind of delay.
08:31 <****> heh
08:31 <****> take it back!
08:31 <****> but... another game is starting!
08:31 <****> what game?
08:31 <****> DoTA
08:31 <****> warcraft 3 custom map
08:34 <****> oh i see
08:34 * chadmaynard pretends to know what that is
08:34 <****> I play that every day.
08:37 <****> uh-huh
08:37 <****> chadmaynard, i am on a lan, don't have a live ip. what could i use in my username/hostname in the following command
08:37 <****> GRANT ALL ON flowers.* TO ''@'';
08:38 <****> rrrobert: 'localhost'
08:38 <****> I forget... can you do wildcards in the host? like '192.168.0.%'
08:39 <****> yes
08:39 <****> well there you go
08:39 <****> ToeBee++
08:41 <****> rrrobert: did you catch that?
08:41 <****> checking.......
08:42 <****> chadmaynard, i have used '%'@'%' but it has not worked
08:42 <****> :-(
08:43 <****> rrrobert: you must specify a username.
08:43 <****> username can't be a wildcard
08:45 <****> Hey, is there a query to get the structure of a db?
08:46 <****>; shows the schema
08:49 <****> chadmaynard, i cannot figure out what is wrong..
08:49 <****> GRANT ALL ON flowers.* TO 'root'@'%';
08:49 <****> rrrobert: have you specified a password?
08:50 <****> where? in the connection string
08:50 <****> "jdbc:mysql://202.92.17.43:3306/flowers","user", "pass");
08:50 <****> in connectionstring: yes
08:51 <****> GRANT ALL ON flowers.* TO 'user'@'%' IDENTIFIED BY 'pass';
08:51 <****> ^ just change user and pass to match the connection string
Total 14 pages. You are browsing page 5/14.
First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last
