Repeating Replication Error
I'm replicating several databases. The most active one has one table
with close to five million rows, one has about half a million and the
rest are pretty small. The master is version 5 on an ubuntu-5.10 box
and the slave is version 5 on a FreeBSD-6.0 box. Once a day the biggest
table gets an infile of several thousand lines. It always works fine.
Things will be great for about a week and then I'll get an error on the
slave, like today's:
060201 11:02:50 [ERROR] Key in wrong position at page 8563712
060202 10:54:25 [ERROR] /usr/local/libexec/mysqld: Table './test/test'
is marked as crashed and last (automatic?) repair failed
The slave process stops, I'll repair the table, restart the slave
process and things will be fine for some number of days before it
happens again. What's going on? The slave tables are never touched (I
have learned that running OPTIMIZE TABLE... on the slave will cause
trouble, so I don't touch anything on it.) Is this bad memory, or a
config issue?
View Complete Forum Thread with Replies
Related Forum Messages:
Rows Repeating Themselves?
can anybody tell me why sometimes when you create a veiw in sql 2000 and run it every row in the results is shown twice? and if so is there a simply way to stop it?
View Replies !
Query Of Repeating Data Once Only
How to query the database, say for a column and pick out the first occurance of a row where many duplicates may vary, then grab the next differet occurance, and so on. Then put these into a table to handle a larger sort issue. Example: dummydata: 1234 1235 1235 4568 4567 1235 5678 5647 2354 1234 And I would like to get a table with: dummydata 1234 1235 4568 4567 5678 5647 2354
View Replies !
Find Repeating Terms In Db?
I saw this answer a few weeks or month back, i think either Spikez or Longneck had answered it. Basically this guy wanted to show the most searched for terms on his site. Now i have a database of my most searched terms. Just wanted to know how to find the top 100 or so? simple db INSERT INTO terms VALUES ('321','cool music'); INSERT INTO terms VALUES ('322','free music'); INSERT INTO terms VALUES ('323','cool music'); as an example. just 2 fields. want to check the second... lets call it term?
View Replies !
Repeating Data From A Query (MySQL/PHP)
Is it possible to repeat 'some' of the data retrieved from a MySQL query up to a certain # of times? I have 2 tables (STORES, CONTEST_ENTRIES). I need to give coupons to winners that must total up to the number of stores at that time. The number of STORES and CONTEST_ENTRIES varies every month. For Example: ========== 140 STORES, 80 CONTEST_ENTRIES I'd like to repeat 'some' of the data so I have at least 140 winners. So, I need to display the normal set of 1-80 from CONTEST_ENTRIES, then repeat another 60 from CONTEST_ENTRIES starting back at the top of the table, ending up with 140 rows of winners. Any ideas? I'm lost right now.
View Replies !
Replication Error
I have a master and a slave. Replication was working fine initially but now when I do 'show slave status', I see this as the error Error no 1449 Error "There is no 'root'@'hostname' registered" on query. What would cause this error message?
View Replies !
Replication Slave 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.
View Replies !
Replication Error On RedHat AS 4 ( 5.0.33)
I download the newer MySQL version 5.0.33. And i compile it for multi-threads support on my 64 bit Redhat AS 4 running on DELL 2950. Everything is fine while installation time. But error occues when another slave MySQL contact this new MySQL version master. After trying, I found out some kind of error "ONLY" happen on 64 bit RedHat AS4 and running with mult-threads MySQL. I wound not wanna downgrade my 64 RH4 AS to 32. Although "Non-Multi-thread" MySQL can well run on my 64 bit RH4 AS, multi-threads MySQL still my prefer if it can work out.
View Replies !
Master/slave Replication Error
I have set up master/slave replication between 2 servers (1 master, 1 slave). However, when I change a table on the master (e.g. by inserting a row), the same table on the slave is not updated. The strange thing is that if I enter SHOW SLAVE STATUS on the client, it gives me the same offset in the binary log on the master as the master gives when issuing SHOW MASTER STATUS (both entered after the update). Code:
View Replies !
Replication :: Error Connecting To Master
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]...........................
View Replies !
Replication :: Slave Thread: Error Connecting To Master: Access Denied For User
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
View Replies !
Replication, Slave Thread: Error Connecting To Master: Access Denied For User:
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
View Replies !
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)
View Replies !
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:
View Replies !
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?
View Replies !
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.
View Replies !
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).
View Replies !
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.
View Replies !
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.
View Replies !
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?
View Replies !
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 .
View Replies !
Replication :: How To?
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???
View Replies !
Checking Replication In 4.0.x
I'm in the phase of upgrading mysql from 3.23(.58) to 4.0(.23). I have some replication setups. Following the manual, the upgrade process went very smooth. Now I have some problems with checking replication automatically. For 3.23 I wrote a shell script, that looks on the master for the Binlog Dump Processes in "show processlist;". That worked perfectly. If the replication was disrupted, the respective process was gone immediately and the check script could send a warning. Principally, the same check script works for 4.0.23, too, but if I stop a slave, the respective Binlog Dump Process vanishes not immediately from the master. It lasts 2200 to 2600 seconds, before the process is gone. Even if I shut down the whole slave server, the Binlog Dump Process stays in the processlist. I haven't found a variable to shorten these 2200 to 2600 seconds to a shorter period of time. With this experience, I tried to setup report-host on the slave side and check on the master with "show slave hosts;". This works also as the method above: If slave is disconnected, the respective slave stays in the list of "show slave hosts;". Only after a longer period of time, the slave vanished from the list. OK, I could write a script to check replication on the slave side. But I did this some times ago (on 3.23). The result was, that in some cases, the script ("show slave status;" also) reported a running slave, which wasn't the truth. So I wouldn't trust this method.
View Replies !
Thinking About Replication
I am thinking about implementing replication. Basic question is what kind of delay there would be to have the data replicated. Not a massive table, and all on the same net.
View Replies !
Replication Through Ssh Tunnels
The master database resides on machine A, and the slave on machine B. The replication is performed through an SSH tunnel. This SSH tunnel is created using autossh to reestablish the connection if it times out or is lost in any way. However, whenever this ssh tunnel breaks, and restarts, the slave binary log (relay log) is corrupted and the replication slave stops. This happens daily, rendering the replication very unstable. Anyone has an idea of any alternative method or any solutions to the problem?
View Replies !
Replication On Only One Server
I am searching on documentation and on web and on groups but I can't find an answer to my question: I want to use replication from one database on one server to onother database on the same server. Is it possibile? The only information I found is that it is possible if you setup 2 servers on the same machine but I don't want to do so. Is there another way to do it? Or maybe someone has a suggestion to solve my problem?
View Replies !
Replication Of Tmp Table
i run a mysql 4.0.13 master and slave on linux rh 7.3 servers. every now = and then i get a error on the slave. the error is that it cannot insert = data into a table that does not exist. the problem is that the table its = complaining about is a tmp table. that table is created when (a) user(s) = runs a query. in the query, i first create a tmp table, insert data from = another table, run a join with another table and display the result. = the query is executed from a web page so all is done with a php script.=20 to get around the problem, i then create the table on the slave. does = 4.0.13 replication handle tmp tables ok?
View Replies !
Replication On 3 Machines
I have 3 machines M1 M2 and M3, i need to setup the following: M1 is the master M2 is reading from M1 M2 is a master for M3 M3 is reading from M2 the problem i got, is when i run a command in M2, it's replicated in M3, but when the command is being run in M1, it's replicated in M2 but not in M3.
View Replies !
Replication Process
I have a Primary PC that acquires data from an external device. This data is stored in a local database. This external device is sending information all the time. There is a Secondary PC that copies the data from the Primary PC database. There is another database in the secondary pc. I have to do this with longer time intervals. I want to: The secondary pc copies only the new incoming data from primary pc database. When the secondary pc copies the data, the primary pc has to delete all these copied records (in the local database). This process has to be repeated continusly.
View Replies !
Replication Issue?
My slave has been working fine up until now. Here is the error message. 030730 11:32:28 Slave: connected to master 'repl@xxxx.xxx.org:3306', replication started in log 'SQLServer1-bin.034' at position 77571524 ERROR: 1062 Duplicate entry '120816' for key 1 030730 11:32:28 Slave: error running query 'INSERT INTO Assignments ( .......... Key 1 is CaseID Database changed mysql> select CaseID from Assignments Order by CaseID DESC Limit 3; +--------+ | CaseID | +--------+ | 120815 | | 120814 | | 120813 | +--------+ 3 rows in set (0.02 sec) mysql> DELETE FROM Assignments WHERE CaseID = 120816; Query OK, 0 rows affected (0.04 sec) If I try to restart the slave I get the error all over again.
View Replies !
Bi-Directional Replication
Can anyone tell me if your product can or will do Bi-Directional Replication. We are currently using MS-Access which has A Desiggn Master and Replica's that can exchange information (data) back and forth between replica's. Is There any way to do this with MySQL? We are looking for a database system to replace MS-Access Glen Boyer IT Manager Pacific Event Productions 6989 Corte Santa Fe San Diego, CA 92121 858 450 7763 (direct) 858 458 1173 (fax)
View Replies !
Replication And Internal
------=_NextPart_000_000C_01C36344.47734B10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Replicating queries where re-written to fix various bugs, most notably time and auto-increment bugs. Why doesn't replication also enforce rewriting INSERT INTO into INSERT DELAYED / etc. I've notice that the replicating thread in 3.23.5x will wait for a table instead of going onto another log event iff that table is being queried. I would think adding DELAYED under the covers for replication would be a big win for mysql, in keeping a slave consistent and up to date. What would the drawback be? It's not waiting for an auto increment value to be returned is there some other intrinsic problem? This should be a win win for both 3.5x and 4.x
View Replies !
Replication SQL_SLAVE_SKIP_COUNTER
I am having a problem with replication in MySQL 4.0.13. I have a my.cnf file in the data directory of the slave that should exclude a specific table in one of my databases from replication. I am getting the following error message: "error 'unexpected success or fatal error' on query 'UPDATE excludedDB.excludedTABLE.....' ". I am sure the syntax is correct in the my.cnf I am excluding several other tables and that seems to be working fine. The above query is for software that is in beta so it is not running all of the time. I can use SET GLOBAL SQL_SLAVE_SKIP_COUNTER to by-pass them for now but I need to find a permanent solution.
View Replies !
Replication From MSSQL
Has anyone ever gotten transactional replication to work from MSSQL to MySQL? I have done very rudimentary tables with 1 or 2 columns but I have run into various errors at startup about invalid cursor state. Any insight you may have is greatly welcome.
View Replies !
Replication And InnoDB
I'd like to setup the following: Server A <-- Server B <-- Server C Data A some of Data A some of Data A Data B Data B Server A should be the master for server B. Server B should get not all but some of the data of server A. Additionally there should be other data stored on server B. Server B is slave for server A and master for server C. Server C simply should get all the data of server B. No problem with MyISAM, but with InnoDB some questions arise: The manual says, that one should shut down the master and copy the InnoDB datafiles, logs and .frm files. 1.) If I only need some data of server A on server B wouldn't it be overkill to copy all the InnoDB data? 2.) If I want to store other data on server B I can't mix up the InnoDB datafiles and logs for data A and B, can I?
View Replies !
[4.0.20] Set Character Set / Bug In Replication?
I've got two Linux x86 servers: master and slave, both with MySQL 4.0.20 from the same package. On the master I do: SET CHARACTER SET cp1250_latin2; UPDATE `my_tab` SET `my_field`='my_cp1250_string'; and got this in both master's and slave's log. On master the data is properly translated into latin2 and I get latin2 characters in my_field. On slave I don't, there are still cp1250 characters. I think, although not 100% sure, thas this worked okey in 4.0.18. Any ideas?
View Replies !
Can't Set-up Slave In Replication
I'm trying to set-up replication following a book and on-line guide. This is over SSH with a tunnel (not sure if the tunnel's required). The master appears to be set-up OK (easy enough). The slave however isn't behaving. I've got a my.cnf with the following: [mysqld] master-host=127.0.0.1 master-port=APORT master-user=AUSER master-password=APASSWORD server-id=2 When I start the slave up and do show slave status - I get 0's and blank entries back. I've tried setting it up using: CHANGE MASTER TO MASTER_HOST='localhost', MASTER_USER='AUSER', MASTER_PORT=APORT, MASTER_PASSWORD='APASSWORD', MASTER_LOG_FILE='AFILE-bin.001', MASTER_CONNECT_RETRY=10; This sets up the slave bits and show slave status looks much better, however, SLAVE START; returns... The server is not configured as slave, fix in config file or with CHANGE MASTER TO I can only seem to find this message in pages that have a list of all Mysql errors.
View Replies !
Replication Interfere
I have MySQL replication set up where data on a master server is being continuously sent to a slave backup server, it works really nice with the binary log file making point in time recovery possible and everything.However, I would love to use this backup server as a platform for testing and developing other MySQL driven applications. Does the MySQL replication process preclude or in any way interfere with the operation of separate databases being run in MySQL on the same slave server or vice versa?
View Replies !
Replication On Windows
I want an urgent help for mysql replication running on 4.16 version does replication works on windows or linux only if it is pls give me minimal steps just first to start it replicatiing.i want it on windows box.
View Replies !
Replication Logging
Im wondering if there is some method to automatically "clean up" the binary logs left by replication even after they are used. For example, I have a number of mysql replication logs sitting on a server. There are about 25 of them, a GIG in size each. My MYSQL replication is UP TO DATE. This means everything is properly sync'd. But I dont want to just 'DELETE' everything.
View Replies !
Replication Fails
we want to set up a replication server to distinguish between reads and writes where one database server is for reads (m1), and the other is for writes (m2) m1 will replicate the data from m2 so that when we serve pages, users only connect to the reads database server now, what we need is a system whereby we are notified if replication stops for whatever reason so that we can switch reads to the write server temporarily or restart the slave does anyone know of an app or way to get alerted as soon as replication stops?
View Replies !
PHP MySQL Replication
I was thinking of setting up a second server to replicate my master server for high availability.However, because I am not using a VPS or dedicated server, my webhost doesn't support MySQL replication. My only option is perhaps to use a PHP script on my master slave, and write any MySQL queries to a file. The second server would then request for this file, say every 2 minutes, and apply the queries to its database. However, there are two concerns: 1) The master server would be slowed down because it will have to write to a file for every SQL query, which can be quite a lot. 2) To ensure integrity, I would have to lock the file while reading it. The master server would then have to wait to process a query when the second server is reading the file. If file reading is slow, especially if there are many queries or high latency between servers, then my website will be awfully slow.
View Replies !
Replication And Clustering
I've noticed that for most customers the built in and low cost replication or clustering abilities of MySQL are a strong selling point (not to mention the fact that the jdbc driver takes advantage of them out of the box) , I'd like to know if people are using it and if this is a common situation, please vote.
View Replies !
Replication Secure
I'm about to jump into the world of mysql replication, but am wondering if the connection between database servers is secure seeing as how they will have to communicate across the internet.
View Replies !
Restart Replication
I need to restart replication between my slave and a remote master. The slave can, and was, fetching updates from the master, but not applying them. When the error was fixed and mysql was restarted, the relay-bin, relay-bin.index, relay-log.info files went away. I've got them up to last night on tape & can restore them, which I'd rather do instead of getting another snapshot, etc. Would the restore from tape be a safe method? After the files are back on disk will the IO thread go through them properly, or am I better off just getting another .tar from the master?
View Replies !
Replication With Mysql
i have two mysql servers remotely installed,i m using one way replication that mean one master is replicating its data to other slave and both r running fine but now i need accoring to my program changes made in slave should be replicated too on master.my few confusions are: 1.)should it be possible as auto_inc records will mismatch and database will go asynchronous? 2.)if it is possible how can it be configured.
View Replies !
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:
View Replies !
Replication Failover
How do I make it automatic that when the Master fails, the Slave becomes the master? I know how to do it manually, but would like to have it in place for automatic changing?
View Replies !
|