Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Intentional Replication Delay


Does MySQL Replication allow a slave backup server to delay the execution of the binary log by a certain amount of time, say 24 hours, to act as a failsafe time buffer against the accidental destruction of data?If not, I would recommend this to the MySQL development team as a useful feature.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Intentional Replication Delay
Does MySQL Replication allow the slave server to delay the execution of the binary log by a certain amount of time, say 24 hours, to act as a failsafe time buffer against the accidental destruction of data?

If not, I would recommend this as a useful feature.

Delay In ODBC Connectivity
I am using MySQL as backend database server of my own Visual Basic Project. I generally code using VB6 as well as VB.Net 2005 also. In both cases I user MySQL ODBC Connector 3.51.06 or 3.51.12. In both cases generally I use DSNLess connectivity style in Visual Basic as follows:

constring = "Driver={MySQL ODBC 3.51 Driver};Server=128.233.2.4;Port=3306;Database=chrd;User=chrd;Password=chrd1234;Option=3;"
Set con = New ADODB.Connection
con.Open constring
con.CursorLocation = adUseClient

When I use MySQL 4.x or 5.x in MS-Windows environment, it works fine and no delay is found in connecting the database, but when I am porting this same code for a Linux Server (Fedora 8) along with 5.x MySQL Server, always I am noticing a few seconds delay in connecting the ODBC remote database, in both VB6 as well as VB.Net 2005. But when connection has been established any query if I fire, it shows result without any delay, very fast.

I have tried the same with MySQL Connector/ODBC 5.1 driver also. But the delay is same.

Just I am asking what is the problem in connecting MySQL server in Linux platform using ODBC, which is producing remarkable delay ? How can I minimise this delay in connectivity?

Connection Delay Mysql_connect()
I have mysql 5.0 server on a Windows 2003 server. I was having long delays with my php pages loading so I moved them to a Fedora Core 4 server with PHP5 on it (I was using PHP3 and thought that was the problem). I still have the delays in loading (almost 4 seconds).

Testing showed that it was the mysql_connect() that was the delay. Searching the website I found mysql_pconnect() which I tried. The delay is still there on the initial connect, but when I hit refresh I get the page generated in nearly no time at all (0.0004 seconds). The mysql_pconnect does not fix the problem of the first attempt to connect though.

Delay, Latency, Slow Mysql
I recently upgraded mysql from 3.23 to 4.0 and found that my websites using the mysql db had a 5 second delay, or latency. I searched for 2 days and found no answer to my latency problem until just a moment ago. I'd like to share the answer in case someone else finds this occurring to them as well.

I was using my real static ip in my website mysql address instead of 'localhost', localhost should have been used initially anyways. I am not real sure what my reasoning was when I initially chose to put in my static IP.

So, If you are like me and keep your stuff on your local machine, use 'localhost' instead of your static IP. At least it fixed my delay issues.

Replication
Is it possible, and what are the ramifications, of having a single slave replicate from three masters? I have six machines, three real servers with three replicating. Be nice to free up two machines and have just a single 'slave'.

Replication
I have 3 databases replicating (ver 3.23) A to B and B to C

On C I want to modify one of the tables and add a column. Tables A and
B will not have this new column added. Will this cause a problem
replicating data form B to C?

Replication
I have a *big* problem and before solving this problem I cannot go productive with my application. Pleas help me to find a workaround.

I have two host (A and B).
I have setup a replication (from A to B).
binlog-do-db=db1 (only db1 will be replicated from A to B).

Consider the following example:

1) On host A:
mysql
use test;
create database db2; (db2 is created only on host A)
quit

2) On host A:
mysql
drop database db2; (this command is replicated on host B)

After step 2 the replication stop.
On host B the command "show slave status" report the following error:

Last_error: Error 'Can't drop database 'db2'. Database doesn't exist' on query 'drop database db2'. Default database: ''

The problem is that if I log into host A, the commands executed before the command "use" are replicated to host B.

Replication Lag
i have mysql 4.1.14 running in a master slave setup.. in a local
network..

The problem i am having, that the replication status on slave show
random bursts of lag.. like , in two consecutive runs of SHOW SLAVE
STATUS, i get Seconds_Behind_Master: 28984, and Seconds_Behind_Master:

Replication
I am trying to set up replication on 2 servers. I am following the procedure on mysql.com.
After you have done the grant replication and the snapshot, you have to do SHOW MASTER STATUS; and it is suppose to return informations. But for me, it returns "empty set".

Replication
I have 3 databases replicating (ver 3.23) A to B and B to C

On C I want to modify one of the tables and add a column. Tables A and
B will not have this new column added. Will this cause a problem
replicating data form B to C?

Replication
I have a set of applications that are used at my coporate workplace, they are used locally by the corporate network users -

However, I have an installation in another location which I wouold like to replicate onto our main server without affecting the other databases so that we can pull data needed off the database during the next business day....is there any quick way to do this???

Replication
I have MySQL 3.23.41 on a RH-7.2 Linux used as local server. I'm trying to replicate the databases from server (192.168.0.1) to another linux PC (192.168.0.3).

Following the manual, i grant to the master a user with file privileges, and edit both my.cnf files. The master starts fine but the slave mysql.log shows up an error:

Slave thread: error connecting to master: Access denied for user:
replica@localhost' (Using password: YES) (0), retry in 60 sec

Replication
I have 2 MySQL servers (windows environmment). I want to setup one way replication between them; Server B must contain the same data as Server A, but if change data on Server B, this change may not be propagated to server A. Is this possible and how do I proceed?

Replication - 4.0.16
We replicate several databases in a master server to three read-only
servers, for load balancing. Sometimes the users notice that one of the
three databases have not updated a few transactions. Has anyone written a
tool that can compare two databases for content? I would sleep much, if I
could run a weekly process that compared each of the replicated databases
with the master.

Replication
I'm replicating just a few tables from the master to the slave.

Sometimes the slave stops with the following error :
"Error 'Table 'xxx' doesn't exist' on query.

That table only exists on the master, and I don't want it on the slave.

Replication
I was running replication successfully for months. I had to increase the max_allowed_packet variable on the master db for other needs. When I did this I noticed that replication stopped working on my slaves. The error on the slaves said the the bin log on the master or the relay log was corrupt.

Replication
I set up a replication with MySQL 4.0.13, it works very fine, but
unfortunately only for several hours (between 10 and 30 hours) Has
someone an idea why the replication stopps?

Replication
I want to ask whether I can do replication in the following case.

innodb (master) --replication --> myisam (slave).

Replication

I have 2 servers, A and B. A is the primary server and master in mysql.

B is the redundant server and the slave in mysql. A is replicating to
B. Now A fails and B becomes the primary server (still slave in
mysql?). A finally comes back up, but instead of switch primary status
from B back to A, A becomes the redundant server and B stays as
primary. Now, I need B to be master in mysql and A to be slave in
mysql.


I don't know if this can be done the way it needs to. If it can I
really don't need a step by step process unless someone is really
willing to give that to me. I just would like to know if this can be or
has been done.

Replication
I have connect my web server (master) to my local server (slave) through
dial-up and replicate 2 databases.

a) Is there a log file describing the replications that happend (if any)?
b) how do I know when to stop the dial-up so not to stop any data transfer
through repliication?

Replication
Can I get the master (or slaves) to automatically remove the binary
logs once they are processed by all slaves?

It says in the mysql manual :
If you are using replication, you should not delete old binary log
files until you are sure that no slave still needs to use them. For
example, if your slaves never run more than three days behind, once a
day you can execute mysqladmin flush-logs on the master and then
remove any logs that are more than three days old. You can remove the
files manually, but it is preferable to use PURGE MASTER LOGS, which
also safely updates the binary log index file for you (and which can
take a date argument as of MySQL 4.1). See Section 13.6.1.1, "PURGE
MASTER LOGS Syntax".
http://dev.mysql.com/doc/refman/4.1/en/binary-log.html

This seems to suggest that you need to estimate an amount of time it
will take for all slaves to be up to date, or have processed all the
binary log files. If this is the case, how do you take into account
something going wrong with the slave/s by not deleting the binary logs
if this happens?

It seems like a better idea to just remove the binary logs when the
master has full evidence that all the slaves have correctly processed
them (I/O thread retrieved them)... is there a way to do this?

Replication
I have 3 databases replicating (ver 3.23) A to B and B to C

On C I want to modify one of the tables and add a column. Tables A and
B will not have this new column added. Will this cause a problem
replicating data form B to C?

Replication
i've this error

:-(


************************************************** **********************
***********************
030710 22:36:43 Slave: connected to master 'repl@217.58.xxx.yyy:3306',
replication started in log 'webserver-bin.054' at position 73
030710 22:38:53 Error reading packet from server: (server_errno=0)
030710 22:38:53 Slave thread killed while reading event
030710 22:38:53 Slave thread exiting, replication stopped in log
'webserver-bin.054' at position 1120
030710 22:38:58 Slave: connected to master 'repl@217.58.xxx.yyy:3306',
replication started in log 'webserver-bin.054' at position 1120
************************************************** **********************
***********************

I've tried to do also

Reset master

On the master before lock tables without result.

Replication
Am Working on a distributed database system.My idea is using replication by having several slaves running on one machine and they all connected to different masters each on different machines at the branches.

First question is this best approach?
Second question is can different slaves with different parameters run on the same machine and if possible what key things must i look for?

Help On Replication
i followed the format and instructions in the manual but i still cant get replication of database...the master started and the slave started also...can somebody who has tried replication .

Two-way Replication
I have set-up a two-way replication for two of our servers, it is for
redundancy only so only one server will be used at any one time.

I noticed that you cannot use auto-increment columns with this sort of
set-up.

What method do others use to get unique ID's in this sort of set-up?

I was thinking of using timestamp with a random number 1-99 added to the
end. But then I suppose it is possible to get a match (more chance of
winning the Lottery though).

Replication
the host should not be an IP address. I even checked the hostname of the machine and it is correct. I tried adding the correct host name to the username when connecting. Still get the same error. I even tried granting replication to 'repl'@'%' for all hosts and it still givess access denied to 'repl' @'10.68.0.1' tried granting replication to 'root'@'10.68.0.1' and it still gives me access denied. Tried grant all to 'repl'@'%' and 'repl'@'10.68.0.1' and it still gives me ACCESS DENIED. I did flush privileges after each grant statement.

Replication Of DB
How the replication of DB can be done?

Replication
I have setup replication between 2 different servers (1 master, 1 slave)
When I insert a new record into the master, it replicates to the slave.
When I update a record on the master, it does not show up on the slave.
Is this an issue that anyone has seen before?

Replication And HA
I have a mysql cluster with circular replication. Can I add one more slave to this existing cluster with one-way replication and use the new slave (with one way repllication) to direct all my reads to this slave and also continue with the existing circular replication.

Replication
I have a large Mysql database and about 500,000 users on my site. I have
installed a load balancer and 4 apache servers but only have 1 mysql server.
Recently, my database server crashed and my site was offline because of
this. While it was down less than an hour, I would like to eliminate this
problem in the future. Would replication help? Meaning if my main database
server went down, I could switch my application to use the second database
server until the main one come back online? I have also thought about having
my application write to 2 databases, but there has to be a simpler way.

3-Way Replication
Has anyone successfully setup 3-way replication? We have not been able to get the master to accept updates from the slave; the slaves all have binary logs enabled. We have been unable to find any information on this on the Net.

Replication Using Ssl
I have replication all set to go between an ubuntu Master and a FreeBSD
Slave. However, no matter what I try I can't get telnetd to run on the
master and the slave is not connecting (I am assuming it's using
telnet). Can someone point me to a dumbed-down recipe on altering my
existing my.cnf files to use SSL for the replication connection to the
Master? Currently I can SSH into either machine, and from one to the
other, without problems.
The error is this:
codd# mysql -u <a user with 'replication slave' rights> -p -h <Master
hostname>
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '<Master
hostname>' (61)

5.0 Replication
I'm using mysql 5.0 and have 1 master and 1 slave. In case there's a problem with the master, I want the slave to become the new master. Can anyone point me to articles describing the setup and the pitfalls for this, or share their own experiences? I had trouble finding info, specifically for 5.0.

Replication And NOW()
Was just wondering, if I had one mysql master with one slave server, would this sort of query cause any problems

insert into (date) values (NOW())

As there could be a potential time difference between the time the master executes this query and the slave does so, could this result in mismatched data? or is mysql smarter than that?

Replication
I have an office computer that uses a MySQL database. What I need to set up is an online duplicate of that database so various data can be displayed via a new website.
What is the best way to upload the database along with new records on a daily (or on demand) basis?
Ive been reading about replication but Im not sure this is what I'm after. Would a php script do it? It needs to be user friendly for my office worker she has limted computer skills.

Replication?
I'd like to create a setup where there are exactly 2 masters which
need to be synchronized against each other. The two masters should
have read+write access, but don't have a permanent connection to each
other. One will be on a LAN-server, the other instance will be
installed on a Windows-client-laptop which can be taken along the
road. When coming back to the office, we need to sync the changed
data.
is there any tool that will allow me to do so ?

Replication
I get the following error when I show slave status on the slave:

Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.
I've run the mysqlbinlog on both the master and slave but am unsure of what to do with it.I've tried the SET GLOBAL SQL_SLAVE_SKIP_COUNTER to 1 and 2 and then stop/start the slave and my SQL slave thread still wont' run.

Replication
If I run RESET MASTER on the primary MySQL server (the master) will it wait till the slaves are up to date before deleting the bin files or do you think my slaves will get screwed up?

Replication
I am confused about MySQL replication. I had someone set it up for me on my server and it works for what is already there. If I add a new database to the master db it doesn't seem to carry over to the slave. Is Replication for the entire MySQL server or is it database specific?I keep reading the manual and it looks server specific but I'm not getting new dbs over on the slave. Do I need to restart the slave?

Replication
Has anyone ever had any issues with the LongBlob datatype and replication.
I'm using 4.1.14
I got it working perfectly, it did thousands of queries and then when I did a show slave status. the sql thread was running but the I/O thread was not. I got the log_position and it's a longblob, microsoft word doc. huge binary string. I tried to stop slave; the skip_position = 1 thing, then start slave, but the I/O still wouldn't start up? I'm not sure how to get it back going or fix the longblob problem. I got no errors on the slave, the I/O is just dead, seemingly irreversable.

NOW() At Replication Slave
We have 3 MySQL servers in replication, 1 master and 2 slaves. One slave server is 300 seconds behind the master due to heavy SELECT statements.

If I run INSERT query (containing NOW()) on master at 10:00 AM, what time will be saved in the slave server which is 300 seconds behind? The query is

MySQL Code:

INSERT INTO users (username, password, signup_date_time) VALUES ('user1', 'pass1', NOW())

How To Replicate Without Replication?
I want to replicate a webserver-database to another computer for realtime backup-purposes. My webserver is able to send e-mails or distribute files by ftp.

The other computer (should act like a backup) is only partial online and I'm able to create a tool that will get e-mails or FTP-files from the webserver in intervals. This tool may be able to execute SQL-statements.

Which is the best way to replicate a database (5 Tables) in this constellation?

Is there a way to write out every UPDATE, DELETE and INSERT-Statement each in one file? Or every minute (if something happend)?

Best would be a file "SQL_MMDDYYYYHHMM.sql" with content like:
"UPDATE tblUsers SET Counter = 10 WHERE UserID = 1"

Is this possible? I think, the binary logfile won't fit my needs?

Other ways of doing that?

Mysql Replication
Is there a total idiots guide to mysql database replication with a simple walkthrough to follow - if there is I cant find it.

Binary Log Without Replication Possible?
I was wondering if it was possible for MySQL to produce a binary log that can be used for Point in Time Recovery without the actual replication process of duplicating everything in another database.

Federated Vs Replication
for one of the applications I'm working on, we're splitting users' tables over multiple independent clusters (each user has an own set of tables), but still need a way to keep overall statistics of all users in a single place.

I can think of three options so far:
1) Replicate the stats table (multi-master replication should work, as table doesn't have an auto_increment field) and update stats using triggers;
2) On all secondary clusters, use federated stats table pointing to the appropriate table on the main cluster and update stats using triggers;
3) Modify the application to execute a query, which updates stats on main cluster, every time a row is inserted into/deleted from user's table;

My SQL Realtime Replication
We are trying to setup Real-time data replication in mysql on Red Hat
Linux Enterprise (AS).
If you have tried ,please me know the tools used,
Also how did you went about with the installation ,

Replication Problems
Show master status on the master looks fine. When I start mysql on the slave, here's what I get:

071017 10:20:35 [Note] Slave SQL thread initialized, starting replication in log 'binary-log.000006' at position 3031, relay log './web1-relay-bin.000003' position: 98
071017 10:23:44 [ERROR] Slave I/O thread: error connecting to master 'replication@myotherserver': Error: 'Lost connection to MySQL server during query' errno: 2013 retry-time: 60 retries: 86400

Master my.cnf:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

old_passwords=1

log-bin=/var/db/repl/binary-log

binlog-do-db=mydatabase
binlog-ignore-db=abunchofotherdatabases

server-id=1

[mysql.server]
user=mysql
#basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Slave My.cnf:
[mysqld]...........................

Replication Privileges Not Available
I have 2 servers (linux fedora 4) with mysql-server (4.1.14-1). I tried to make replication available. And when i load data from master on slave , i have this message :
ERROR 1219 (HY000): Error running query on master: Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation

Before on my master server, i attribute these privileges:


Copyright © 2005-08 www.BigResource.com, All rights reserved