#mysql
02 October 2007
Total 26 pages. You are browsing page 5/26.
First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last
02:30 <****> can mysql have views?
02:30 <****> only 5+
02:30 <****> oh well
02:31 <****> wish i could use pg/sql :(
02:31 <****> thanks
02:32 <****> i have a column id in one table and i would like to create id in another table and populate it with the same values . i tried insert into table1 (id) values (select id from table2); but that didn't work
02:32 <****> id is already created in table2
02:32 <****> I am tring to reset my root password. Following the directions on dev.mysql.com. I stop mysql and restart using the --skip-grant-tables. I try to log into mysql as root but I get access denied. Any ideas?
02:33 <****> maestrojed: there will be no password
02:33 <****> mysql -u
02:33 <****> verbose, try INSERT ... SELECT syntax. INSERT INTO table1 (id) SELECT id FROM table2;
02:35 <****> chadmaynard: I think you may have been helping me with this yesterday (I know you have helped me in the past). I agree I use "mysql -u root" but I still get that access denied message. I have been told I should but I do and I am not sure how to move on
02:35 <****> you didn't skip grants then
02:36 <****> I guess not but I used that option when restarting. "sudo /etc/init.d/mysql start --skip-grant-tables"
02:37 <****> maestrojed: init scripts generally don't parse those options : )
02:37 <****> you should start mysql directly
02:37 <****> ok
02:38 <****> we lost a server!
02:38 <****> You will be dearly missed, anthony.
02:38 <****> we gained a server!
02:39 <****> Simetrical: thanks
02:45 <****> chadmaynard: thank you, I am all fixed up.
02:57 <****> in a select, if i select a normal column and a count(fld1) from another table, how can i present the two side by side?
03:00 <****> select coluimnname, (select count(fld1) from table2) as cnt from table1
03:00 <****> maybe you can use a join to remove the subquery
03:03 <****> does MySQL4 support subqueries?
03:04 <****> like: INSERT INTO footable (somefield) VALUES (SELECT foovalue FROM someothertable WHERE bling = blang); ?
03:04 <****> 4.1 does, 4.0 no
03:04 <****> MrNaz: you can try insert .. selrct
03:04 <****> MrNaz: you can try insert .. select
03:05 <****> !m MrNaz insert selrct
03:05 <****> Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/insert selrct
03:05 <****> !m MrNaz insert select
03:05 <****> MrNaz see http://dev.mysql.com/doc/refman/5.0/en/insert-select.html
03:05 <****> kimseong i'm using 4.0 i think
03:23 <****> MrNaz: insert .. select works even in 4.0, but not the subquery in values
03:44 <****> I am having a strange problem with mysql, and I'm not sure how to debug it. I think it has to do with character sets. I am using PHP and JSP to test. MySQL shows collation latin1; when I retrieve the content using PHP and display it using UTF-8, but jsp is showing garbage.
03:45 <****> MySQL version 4.1
03:49 <****> SET character set utf8
03:49 <****> ensure content type is set to utf-8 too for the browser
03:55 <****> content type is set as utf-8
03:56 <****> but without setting a characterset in php, it displays the content correctly.
03:56 <****> does mysql 4.1 support regexp
03:56 <****> Hey
03:56 <****> but jsp, with setting useUnicode=true&characterEncoding=UTF-8 it still shows as garbled
03:56 <****> Question -- can you do updates on a view?
03:56 <****> fyrestrtr: tried adding ?useUnicode=true to your jdbc connection string?
03:56 <****> oh, guess so
03:59 <****> F
03:59 <****> NemesisD: yes. but it can never use an index
03:59 <****> NemesisD: no version can.
03:59 <****> is there something wrong with select * from `drives` where `Capacity` REGEXP '/^100(\.\d{0,2})?(GB|gb|Gb)?$/';
04:00 <****> even without the /'s it still isn't working properly
04:00 <****> NemesisD: yes... your schema is disgusting ;)
04:00 <****> NemesisD: always slow, will need to do a table scan.
04:00 <****> flyingparchment: that sums it up
04:00 <****>
04:00 <****> i dont want to
04:00 <****> lol
04:00 <****> formatting as "53GB" should be done by the application
04:00 <****> what about TB
04:00 <****> NemesisD: this is not the way to do it. you could use WHERE col IN ('string1','string2', ...) that would be able to use index.
04:00 <****> we aren't far from that
04:00 <****> the application can do TB too
04:01 <****> TB is a multiple of GB
04:01 <****> yeah except nobody would be inputting it as 1500GB or anything
04:01 <****> ugh
04:01 <****> if you treat an RDBMS like a spreadsheet, you get a headache. the above is a typical example.
04:01 <****> i know you guys are right but theres already data in this schema
04:01 <****> NemesisD: so your app converts it. jeez,are you just trying to be difficult? YOU are the one with the headache, not anybody else here.
04:01 <****> so convert it. or suffer more later.
04:02 <****> well, you asked if there's anything wrong... this is very, very wrong.
04:02 <****> i agree, change it today, be happy tomorrow
04:02 <****> fix it now, or fix it more later. or die. your choice & freedom eh
04:02 * arjenAU agrees with fl
04:02 <****> flyingparchment:
04:02 <****> when your dataset grows or # of users grows, the REGEXP will be too slow.
04:02 <****> tablescans don't scale
04:03 <****> well im glad i've got an employer that probably won't be willing to pay for the amount of time it would take to do this, but thats my issue, thanks all
04:03 <****> someone actually gave you money to come up with this design? ;)
04:03 <****> thats what he gets for getting an amateur mysql person do do stuff that professionals get paid a heck of a lot more to do
04:04 <****> hey
04:04 <****> 279805655
04:05 <****> wait
04:05 <****> fuse_lt: it's a number. it could, in theory, represent a unix timestamp.
04:06 <****> yeah, it was coming out incorrect
04:06 <****> but i made a code error
04:11 <****> NemesisD: doesn't cost a lot, but cheap comes at a price. the price of failure.
04:12 <****> thanks
04:12 <****> :(
04:12 <****> oh, i solved my strange binlog truncation issue.. turned out to be a defective disk
04:14 <****> (of course it corrupted the innodb data file before it was identified..)
04:15 <****> great
04:15 <****> flyingparchment: wikipedia machine, or?
04:16 <****> sorta
04:16 <****> NemesisD: that note was for your employer. I don't blame you for making a living
04:16 <****> horray for offsite backups? :)
04:16 <****> toe: it was only a slave.. and fortunately i had a copy of the data directory from a week or two ago anyway :)
04:16 <****> i'm a little annoyed the array didn't notice the problem though.. it did log media errors for the drive
04:17 <****> arjenAU, yeah i understand and i agree, the plus side is that i am learning every time i make one of these mistakes, i've become a better php programmer in the process as well so its not all bad
Total 26 pages. You are browsing page 5/26.
First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last
