Re: [OT] When MySQL Bites: Quirks to Watch Out For

2008-03-28 Thread Ofer Inbar
It appears to be an article for perl programmers not familiar with MySQL, warning them of MySQL quirks they should be aware of. If you write a perl script with DBD::MySQL and try one of the examples he gave, and check your return status to see if the statement succeeded, does it appear to have suc

valuation tangent (was Re: Sun and mysql)

2008-01-17 Thread Ofer Inbar
Olaf Stein <[EMAIL PROTECTED]> wrote: > It will be interesting to see if facebook, youtube and alike websites will > ever generate enough earnings to cover the costs they were bought for. > Just because 50 million people know a website, it does not mean it makes > money automatically. The Google m

Re: ERROR 3 (HY000): Error writing file (Errcode: 5)

2007-11-19 Thread Ofer Inbar
Daevid Vincent <[EMAIL PROTECTED]> wrote: > mysql> use mydbB; > mysql> CREATE TABLE foo ( id int(10) unsigned NOT NULL auto_increment, name > varchar(255) NOT NULL, PRIMARY KEY id (id) ); > ERROR 3 (HY000): Error writing file './mydbB/foo.frm' (Errcode: 5) > > mysql> use mydbA; > mysql> CREATE TAB

Re: Reply-to is to originator rather than to list

2007-10-22 Thread Ofer Inbar
I've seen this debate on a lot of lists. I firmly believe having a list munge reply-to is almost universally a very bad idea (the main exception being very small lists of people who know each other). Most email programs allow you to tell them the names of the lists you subscribe to, and/or can au

MySQL crashing on flush-logs

2007-10-03 Thread Ofer Inbar
We have MySQL 5.0.27 running on about 10 different RedHat EL4 boxes, all from the same RPMs. Every night we run mysqladmin flush-logs from crontab (as well as some other things) on most of these servers. One on server, mysqld is dying with signal 11 every single night right during the mysqladmin

Re: seeding a slave from a slave

2007-07-25 Thread Ofer Inbar
"Ian P. Christian" <[EMAIL PROTECTED]> wrote: > How do I create a mysql data dump from a slave to seed another slave? > Using --master-data with mysqldump from my existing slave sets the > master to the slave I was dumping, not the real master. I started a discussion of the same thing a week or t

Re: mysql dump help!

2007-07-24 Thread Ofer Inbar
> On 7/24/07, Red Hope <[EMAIL PROTECTED]> wrote: > >mysql> > > > >mysql> \R shell> > >PROMPT set to 'shell>' > > > >shell> It doesn't matter what the prompt says, it's still mysql you're running here. When people say "the shell prompt" they don't mean "make your prompt say the word shell", they

Re: Replication broken - fatal error 1236: 'error reading log entry'

2007-07-19 Thread Ofer Inbar
On Wed, Jul 18, 2007 at 06:13:10PM -0400, I wrote: > This afternoon, both slaves stopped at the same place, with the same error: > 070718 17:28:00 [ERROR] Error reading packet from server: error reading log > entry ( server_errno=1236) > 070718 17:28:00 [ERROR] Got fatal error 1236: 'error readin

Replication broken - fatal error 1236: 'error reading log entry'

2007-07-18 Thread Ofer Inbar
MySQL 5.0.27 from RPM, on Redhat EL4. One master, two slaves, one database. Slaves have been up for 5 days. This afternoon, both slaves stopped at the same place, with the same error: 070718 17:28:00 [Note] Slave SQL thread initialized, starting replication in log 'hlgbinlog-oil.15' at pos

tangent: confusing iostat readings (was Re: why are tmp tables being created on disk?)

2007-07-17 Thread Ofer Inbar
Mathieu Bruneau <[EMAIL PROTECTED]> wrote: > > BTW, here's another oddity I noticed - here's typical output from > > "iostat 60": > > > > | avg-cpu: %user %nice%sys %iowait %idle > > |7.350.003.590.94 88.12 > > | > > | Device:tps Blk_read/s Blk_w

quickly copying a database

2007-07-17 Thread Ofer Inbar
I've got a server with a database that's about 10G. I need several other copies of this database, with different names, on the same host and same MySQL instance. I could mysqldump the db and then restore it into the others... mysql> create database one; mysql> create database two; ... mysqldum

Re: why are tmp tables being created on disk?

2007-07-17 Thread Ofer Inbar
mos <[EMAIL PROTECTED]> wrote: > >Why are so many small tmp tables being created on disk, not memory? > >How can I tell MySQL to use memory for these? >I'd guess these temporary files are the result of Select statements > with an Order By clause that requires a FileSort. You can do a Show

why are tmp tables being created on disk?

2007-07-17 Thread Ofer Inbar
MySQL 5.0.27 running on Redhat EL4. In /etc/my.cnf I have: tmp_table_size=64M mysql> SHOW GLOBAL VARIABLES LIKE "%tmp%"; +---+--+ | Variable_name | Value| +---+--+ | max_tmp_tables| 32 | | slave_lo

replicating from multiple masters

2007-07-16 Thread Ofer Inbar
Say I have database1 on server1, database2 on server2, etc. I'd like to set up one server where I can *look* at all of these databases, without modifying them - a read-only aggregator. What I'd like to do is, have the aggregator have local copies of database1, database2, database3, etc., and repl

slave backups & master data

2007-07-16 Thread Ofer Inbar
We've got a couple of production databases using mostly MyISAM tables, that can't be taken offline without bringing down our application. To reduce downtime, we run a full mysqldump once a week and back up the binary logs every day, so we can always use them to "catch up" from the most recent full

Re: starting a second slave from a first slave's dump

2007-07-11 Thread Ofer Inbar
Baron Schwartz <[EMAIL PROTECTED]> wrote: > Ofer Inbar wrote: > > host a is the master > > host b is a replication slave > > host c is to become a second replication slave > > there's no full dump from host a > >One possibility I can think of: >

starting a second slave from a first slave's dump

2007-07-11 Thread Ofer Inbar
Scenario: host a is the master host b is a replication slave host c is to become a second replication slave there's no full dump from host a Normally, to start a new slave, I'd restore a dump from host a, and start slaving using the master data in that dump. In this situation, however, ru

how to stop replication at a specific position?

2007-07-11 Thread Ofer Inbar
When you start a replication slave you can tell it where in the binary logs to start (which log file, what position) ... but can you tell it to automatically *stop* when it reaches a certain point (also identified by log file name and position) ? -- Cos -- MySQL General Mailing List For list ar

"flush logs" vs. mysqladmin

2007-06-12 Thread Ofer Inbar
We run a mysqladmin flush-logs from cron every night. This causes our server to start a new binary log. However, the slow query log does not get flushed - our server continues updating the same slow query log file. If I run mysql and then issue a "flush logs" command, it flushes the binary logs

Re: MySQL upgrade from 5.0.32 to 5.0.42 broke replication

2007-06-12 Thread Ofer Inbar
"Ian P. Christian" <[EMAIL PROTECTED]> wrote: > In theory, I should be able to find out where the slave was up to in the > old logs, extract them manually and replay them on the slave, and then > reset the slave to use the new logs - however i'm not sure how reliable > that's going to be - or even

Re: dbnightly maintenance & backup script

2007-05-16 Thread Ofer Inbar
On Thu, May 10, 2007 at 03:23:31PM -0400, Ofer Inbar <[EMAIL PROTECTED]> wrote: > http://thwip.sysadmin.org/dbnightly The version I put up there had a minor bug: 176c176 < my ($sec,$min,$hour,$mday,$mon,$year) = localtime(time); $year+=1900; --- > my ($sec,$min,$hour,$

Re: InnoDB dropping records / MyISAM working as it should

2007-05-15 Thread Ofer Inbar
Kenneth Loafman <[EMAIL PROTECTED]> wrote: > Sounds like InnoDB is still borked though. You should not have to use a > commit unless you have started a transaction, as I understand it. The > semantics for non-transaction access should be identical. Are you explicitly telling Python not to use

dbnightly maintenance & backup script

2007-05-10 Thread Ofer Inbar
binlogs subroutine from this script (dbnightly was not complete yet) -- Cos (Ofer Inbar) -- [EMAIL PROTECTED] http://thwip.sysadmin.org/ "cos, is perl God?" 'No, Larry Wall is God. Perl is the Language of God." "But I thought you don't believe in God?"

tracing the source of a query

2007-05-09 Thread Ofer Inbar
A certain query happened on our server today, that we'd like to find the source of. I can see the query in our binary long... mysqlbinlog shows: # at 114047594 #070509 15:29:21 server id 2 end_log_pos 114047722 Query thread_id=1041159 exec_time=0 error_code=0 SET TIMESTA

Re: slave replication fails, cannot create user

2007-05-04 Thread Ofer Inbar
Baron Schwartz <[EMAIL PROTECTED]> wrote: > What version of MySQL are you running on each machine? Sorry, I should've included this information. Both of them are running 5.0.24, installed from exactly the same .rpm file. I wanted to avoid any issues related to different MySQL versions during thi

slave replication fails, cannot create user

2007-05-04 Thread Ofer Inbar
I "solved" the problem by adding slave_skip_errors=1396 to my.cnf and restarting the slave server. It was able to pick up replication and is now caught up with the master and seems to be fine. However, 1. I don't understand what caused the problem 2. I fear that after I un-slave

Re: slave status: vague documentation of Seconds_Behind_Master

2007-05-02 Thread Ofer Inbar
Mathieu Bruneau <[EMAIL PROTECTED]> wrote: > > In the section on Seconds_Behind_Master, first it says: > > > > When the slave SQL thread is actively running (processing updates), > > this field is the number of seconds that have elapsed since the > > timestamp of the most recent event on the

a script to archive binary logs

2007-05-02 Thread Ofer Inbar
$destdir/$_" } readdir(DESTDIR) ) { $savedfile =~ s/.gz$//; next if -f "$srcdir/$savedfile"; print "Deleting $savedfile from $destdir\n"; unlink "$destdir/${savedfile}.gz" or unlink "$destdir/$savedfile" or warn "$0: error deleting $save

Re: expire_logs_days

2007-05-02 Thread Ofer Inbar
Mark Leith <[EMAIL PROTECTED]> wrote: > Do keep in mind that expire_logs_days only gets triggered at a) server > start up b) the time a binary log has to roll over. > > If your binary logs do not roll over for quite a period of time (i.e are > lower load systems) that still stay up for long peri

slave status: vague documentation of Seconds_Behind_Master

2007-05-02 Thread Ofer Inbar
I'm confused by a bit of the documentation here: http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html In the section on Seconds_Behind_Master, first it says: When the slave SQL thread is actively running (processing updates), this field is the number of seconds that have elapsed si

Re: expire_logs_days

2007-05-02 Thread Ofer Inbar
e had direct experience with expire_logs_days either working or not working? What happened? (note: I'm running 5.0.24) -- Cos (Ofer Inbar) -- [EMAIL PROTECTED] "OSI is a beautiful dream, and TCP/IP is living it!" -- Einar Stefferud <[EMAIL PROTECTED]>

expire_logs_days

2007-05-01 Thread Ofer Inbar
There's a system variable called expire_logs_days that lets you set a number of days to keep binary logs, and automatically delete logs older than that. I've heard rumors that using this feature is problematic. I notice that in the MySQL documentation about binary logging, it tells you to use "pu

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-

problem restoring from binary log

2007-04-25 Thread Ofer Inbar
he database at the time of the restore and there are no rows in the table where the value of that column is 0 or NULL. I believe what I'm trying to do is a pretty standard way to set up backup and restore for a production mysql database, so it should work. Any ideas? -- Cos (Ofer Inbar)