Re: problem restoring from binary log

2007-04-27 Thread Mathieu Bruneau
Ofer Inbar a écrit : I'm trying to set up MySQL backup restore using mysqldump and binary logs, so we can run mysqldump infrequently and use binary logs for the daily backups (because mysqldump makes the production database unusable for too long a time to run every night). - I can make

Permissions and Into Outfile

2007-04-27 Thread Kebbel, John
I was trying to write the output of a select statement to a tab-delimited text file. I could not write the file to a folder inside /var/www or to my home file because of permission problems. After a moment's reflection, I realized /tmp had stuff written to it all the time, so its

Re: Bin logs and mysql 4

2007-04-27 Thread dpgirago
So if one is doing a full mysqldump every night, all bin-logs can be deleted after this? If bin-logging is disabled, will master/slave syncing still occur? David Issuing a 'reset master' will purge all of the logs as well. I wouldn't just rm them, as they are being tracked in the index

Re: Permissions and Into Outfile

2007-04-27 Thread Gerald L. Clark
Kebbel, John wrote: I was trying to write the output of a select statement to a tab-delimited text file. I could not write the file to a folder inside /var/www or to my home file because of permission problems. After a moment's reflection, I realized /tmp had stuff written to it all the time,

RE: Permissions and Into Outfile

2007-04-27 Thread Kebbel, John
cat /etc/passwd on my Macintosh 10.3 at work (I'm using Linux at home) shows me this for mysql ... mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false The home directory for mysql is /var/empty, which does exist. Should I write ~into file~ output to this folder or should I change the mysql

Categories of Users and Privileges

2007-04-27 Thread Kebbel, John
Up to this point, I have controlled MySQL privileges from Perl or PHP pages. All connections to the database used the same MySQL login. Ordinary users used pages that strictly controlled selections, insertions, or updates. Administrators/Developers used password-protected pages that

Re: Permissions and Into Outfile

2007-04-27 Thread Gerald L. Clark
Kebbel, John wrote: cat /etc/passwd on my Macintosh 10.3 at work (I'm using Linux at home) shows me this for mysql ... mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false The home directory for mysql is /var/empty, which does exist. Should I write ~into file~ output to this folder or should

Re: FW: MySQL patches from Google

2007-04-27 Thread Brent Baisley
I've read a few technical papers on how large companies handle massive amounts of data (i.e. search engines, phone companies). Really it comes down to no general purpose database is strong enough (including Oracle) to handle the amount of data involved. Which is why phone companies, google, etc

RE: Permissions and Into Outfile

2007-04-27 Thread Mogens Melander
Another variant would be, to create a directory under your www area, and give it your-user:mysql 775 permissions, or maybe web-server-user:mysql 775 permissions, depending on what you want to do with the csv file. On Fri, April 27, 2007 16:41, Kebbel, John wrote: cat /etc/passwd on my Macintosh

Optimize code?

2007-04-27 Thread Jerry Schwartz
I need (ultimately) to update some prices in a prod_price table. First, I need to locate a product and its associated prices using a field prod.prod_price_prod_id which is not unique, and is often null, but it is indexed. (Subsequent operations will use PRIMARY keys, but I haven't gotten there

Re: problem restoring from binary log

2007-04-27 Thread Ofer Inbar
Mathieu Bruneau [EMAIL PROTECTED] wrote: Ofer Inbar a écrit : I can repeat the problem with this procedure on the test db: - Import a full mysqldump file from the prodution db - flush logs - run a full mysqldump with --flush-logs --master-data=2 - do a bunch of stuff that writes

Re: My bin.log directory is getting full

2007-04-27 Thread Pete Harlan
Perhaps the expire_logs_days variable does what you're looking for. --Pete On Thu, Apr 26, 2007 at 09:01:58PM -0400, Tim Lucia wrote: # cat /etc/cron.mysql/20-purgemasterlogs #!/bin/sh /usr/bin/mysql --defaults-file=/root/.my.cnf -e 'show master logs; purge master logs before date_sub(now(),

Re: Optimize code?

2007-04-27 Thread Jay Pipes
Hi Jerry, comments inline Jerry Schwartz wrote: I need (ultimately) to update some prices in a prod_price table. First, I need to locate a product and its associated prices using a field prod.prod_price_prod_id which is not unique, and is often null, but it is indexed. (Subsequent

Re: problem restoring from binary log

2007-04-27 Thread Mathieu Bruneau
Ofer Inbar a écrit : Mathieu Bruneau [EMAIL PROTECTED] wrote: Ofer Inbar a écrit : I can repeat the problem with this procedure on the test db: - Import a full mysqldump file from the prodution db - flush logs - run a full mysqldump with --flush-logs --master-data=2 - do a bunch of

INSERT ... ON DUPLICATE KEY UPDATE seems so close and yet so far...

2007-04-27 Thread Daevid Vincent
Maybe this is some SQL standard implementation and that's why it is what it is, but to me it seems completely retarded that you have to explicitly call out the columns... http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html Why doesn't it work in a more convenient and sane way?! So

Re: INSERT ... ON DUPLICATE KEY UPDATE seems so close and yet so far...

2007-04-27 Thread Philip Hallstrom
Maybe this is some SQL standard implementation and that's why it is what it is, but to me it seems completely retarded that you have to explicitly call out the columns... http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html Why doesn't it work in a more convenient and sane way?! So

RE: Permissions and Into Outfile

2007-04-27 Thread John Kebbel
I experimented with a local /var/www folder. I assumed setting 2, 6, or 7 for the Other value would give mysql write privileges, but mysql would not settle for anything less than a 7 in that last slot. What was really curious to me was that the User and Group settings were inconsequential. I even