Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

02 November 2007


Total 16 pages. You are browsing page 1/16.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Fri Nov 02 00:00:02 2007
--- Day changed Fri Nov 02 2007
00:00 <****> jbalint: ahh okay i might jsut google it if it sounds like a commonish problem on leopard= )
00:00 <****> anathematic: yeah, i cant remember the details
00:00 <****> Zyclops: where date < date(now()) order by date desc limit 1
00:00 <****> jbalint: yeah looks like you need to start it manually http://www.robbyonrails.com/articles/2007/10/27/starting-mysql-after-upgrading-to-os-x-leopard
00:01 <****> ki77a77: ahh rigtht thankyou :)
00:02 <****> hmm, but that will only return one record
00:02 <****> if it was the case for 5 names.. would i then just have to use a group by?
00:03 <****> Zyclops: you wrote " how can i find the value for a particular
00:03 <****> name where the date is the highest before today
00:04 <****> sorry, yeah that wasn't the right question.. I actually need to limit down another set of data
00:04 <****> so where mydate = (SELECT * FROM bla GROUP BY date HAVING date < TODAY())
00:10 <****> Zyclops, how can mydate be = a SELECT * ?
00:11 <****> it can't
00:11 <****> Zyclops: where date = subdate(now(), interval 1 day)
00:12 <****> Zyclops, not sure what you are trying, but maybe: select value from bla where name='xxx' and date< TODAY() ORDER BY date DESC LIMIT 1
00:13 <****> sorry guys... i'll try and type up my question properly and put it into pastie
00:17 <****> Zyclops, possibly you want: select name,value from (select name,max(date) as maxdate from bla where date< TODAY() group by name) AS bar JOIN bla ON bar.name=bla.name and bar.maxdate=bla.date
00:17 <****> when running a script from the command line, one would use mysql < file.sql right? but how do I do that when I have many files? bash doesn't like that I use wildcards
00:18 <****> Hermann, you can always use the old: cat *.sql | mysql
00:33 <****> on 5.1.21-beta it seems when i give perms to a user for a single database i.e. 'GRANT ALL ON maps.* to 'user'@'localhost' IDENTIFIED BY 'test';
00:33 <****> they user is not allowed to login via the command line
00:33 <****> when i change it to GRANT ALL ON *.* they can login
00:36 <****> strange, when i give perms to test.* they can login, so it must be something permission wise specific to the db im user
00:37 <****> msbhvn: at one point, logging in to mysql for any db that started with 'test' did not require a password. Still?
00:40 <****> ki77a77: wow i think i could massively confused myself for about 20 minutes because I forget to be sure and do 'flush privileges'
00:40 <****> *think i just
00:40 <****> deleted users were still able to login, etc
00:41 <****> was pretty confused and then thought, its like its not flushing to the privileges.. doh!
00:41 <****> msbhvn: manually updating the mysql administration db?
00:50 <****> can I use ON duplicate KEY UPDATE to append a number to a string?
00:54 <****> hello, everyone. I'm doing an emergency restore of a db and I'm given two methods to access the system: phpmyadmin and ssh. I tried phpmyadmin and it appears to time out. I try ssh and I get a max_queries error.
00:54 <****> what should I do?
00:55 <****> unfortunately i do not run the server.
00:55 <****> I have had no luck contacting the admins.
01:00 <****> Aggrav8d: you got a real problem if number of queries your mysql user can issue is limited. See http://dev.mysql.com/doc/refman/5.0/en/user-resources.html
01:02 <****> !perror 150
01:02 <****> MySQL error: 150 = Foreign key constraint is incorrectly formed
01:15 <****> ki77a77 - thanks. just confirms what i originally suspected...
01:15 <****> stupid jerks and their stupid web host...
01:27 <****> ki77a77: pretty much yeah, removing rows rom mysql.user
01:33 <****> ys
01:33 <****> oops
01:33 <****> hey guys
01:33 <****> do you have experience with creating a full text index on a huge database?
01:34 <****> would it be a long process?
01:34 <****> can I use * in a JOIN?
01:35 <****> I think you must specify a table
01:37 <****> How do I load a file with sql commands into mysql.. (not piping..)?
01:37 <****> after I start mysql.. I want to type in a command.. like in pgsql... \i filename.sql
01:38 <****> sander: LOAD DATA INFILE
01:38 <****> Google!
01:39 <****> yes google
01:39 <****> 700 bucks today
01:40 <****> You earnt today? o.O How...?
01:40 <****> :p
01:40 <****> Shai-Tan, yes you can, but in general you should not use * (in joins or otherwise)
01:41 <****> I thought mysql was opitmized for SELECT * fROM...
01:42 <****> Shai-Tan: SELECT * will read _all_ columns from disc, and will send _all_ columns to the applcation.
01:43 <****> _k_: which is what I want
01:43 <****> Shai-Tan: If you don't need all columns, you should better just specify columns you need
01:43 <****> I need them all
01:44 <****> Shai_Tan: Then SELECT * still can be dangerous, in case somebody extends your table with new columns.
01:44 <****> ahh, good point
01:44 <****> noted
01:44 <****> I see if somebody put in a nice juicy BLOB or TEXT
01:45 <****> so, if I want the wanted fast, I would just need to include the id field?
01:45 <****> Shai_Tan: So you're always on the safe side to list the column names you really need.
01:45 <****> so, if I want the wanted fast, I would just need to include the primary key field
01:53 <****> is there a way to convert a standard mysql dumb to extended format? (ie fewer individual queries) ?
01:54 <****> s/dumb/dump
01:57 <****> Aggrav8d: Nope
01:57 <****> Aggrav8d: Once you created the dump, it's not possible to reformat it. Unless you are a perl guru
01:58 <****> Aggrav8d: Next time you run mysqldump, use the --extended-insert option
01:58 <****> whats a safe way to setup a backup on mysql ? using cron seems insecure if anyone ever got a user name and pass ?
01:59 <****> When selecting such as WHERE `username`='$user' - how do i make it NOT case sensitive?
01:59 <****> raden_work: What about copying the data directory then?
01:59 <****> didnt know you could do that
01:59 <****> raden_work: Or don't allow users on your database host.
01:59 <****> or is there a user that can only use mysqldump ?
01:59 <****> raden_work: Only works for certain storage engines, and you either have to lock the tables or shutdown the server
02:00 <****> well im using INNODB
02:00 <****> raden_work: mysqldump will require read access to your server
02:00 <****> raden_work: To copy the innodb file space, a server shutdown is required.
02:00 <****> cant have that
02:01 <****> like mysql server shutdown ?
02:01 <****> raden_work: Then use mysqldump, and make sure the password is secured
02:01 <****> well i could do a fast mysqld stop and then copy directory and mysql start
02:01 <****> make a script
02:02 <****> raden_work: If you can afford the downtime. How big is your data directory?
02:03 <****> not big just gets accessed alot all of our customers its accessed internally and externally and then all service calls are stored in it it provides many functions size not a issue
02:04 <****> raden_work: Can you do a filesystem snapshot? LVM or Veritas?
02:05 <****> dont know what you are talking about im running suse linux
02:06 <****> raden_work: Then the answer is obviously "no" :)
02:06 <****> like a few minutes of down time wouldnt kill us
02:06 <****> _k_, you said can i right ? now how do i know that if i dont know if my operating system has that capability :)
02:06 <****> raden_work, not much point in actually stopping/restarting mysqld, just FLUSH TABLES WITH READ LOCK;.
02:07 <****> Simetrical: This is not sufficient for InnoDB tables.
02:07 <****> raden_work, if you're using something like LVM you should be able to figure out in a variety of ways. It's not usually enabled by default (perhaps unfortunately).


Total 16 pages. You are browsing page 1/16.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo