Quantcast
Channel: MySQL Forums - Replication
Viewing all 1561 articles
Browse latest View live

MySQLRouter 8 : How to detect correct master DB (no replies)

$
0
0
I have 3 MySQL server with replication, one is master (Server1) and the two others slaves (Server2 and Server3).

Due to network topology, the system can get into the following state:

- Server1 is no more connected to Server2
- Server1 is no more connected to Server3

In consequence, Server2 and Server3 elect a new Master : Server2
In the same time Server1 (isolated in the cluster) still Master (and see Server2 and Server3 UNREACHABLE)

The Application Server still have access to all DB Servers.

Is MySqlRouter 8 able to choose the correct master to perform request (ie choosing Server2) ?

Last_IO_Errno: 1129 Last_IO_Error: error connecting to master (no replies)

$
0
0
I am configuring Master-Master replication between 3host & 2 databases.
Replication set 1: ABC location to MNO Location (DB: test1)
Replication set 2: ABC location to XYZ Location (DB: test2)

Right now, Replication between ABC -> MNO & ABC -> XYZ is working fine. However, since its a Master master I had to setup 2 Channel replication one from MNO -> ABC & another from XYZ -> ABC.

Slave status on ABC for both is throwing error:

Last_IO_Errno: 1129
Last_IO_Error: error connecting to master 'repl_user@xxx:3306' - retry-time: 60

MySQL version I am using is 8.0.13.

Please help.

How do I connect the slave server? (no replies)

$
0
0
How do I connect the slave server? If you can not block the master server to write!

Dual MySQL Replication (no replies)

$
0
0
How to backup and restore the Dual Master Replication for the master and slave server. I got this setup running for more than 10 years. The master and slave servers are pretty old, and like to upgrade to new servers. Just wanna know what is the best way to backup and restore Dual MySQL Replication for both master and slave server, not just data and the configuration as well. So I can restore and run the dual master replication for the new master and slave servers.

Or I can only backup the data, and do the configuration again for dual master replication?

Can someone shred me some lights? Much appreciated.

Only 1 thread works in mysql repliation master node (no replies)

$
0
0
I just updated mysql from 5.1.73(single instance) to 5.7.22 replication(GTID rep mode),but when I run "show processlist;",I found that only 2 user threads established for my code,and only one of them working at the same time.
Same phenomenon even I increased minimum-connection-count from 1 to 10, 10 user threads established but only 1 of them working at the same time.

That's confused, cause I'm using the same code,the same config file as before.
So I tested it on a mysql5.7 single node(almost same my.cnf except some master-slave params),It goes well as before,multi threads works.

I've read some new features for mysql 5.7 replication,still can not find out the reason, anyone any tips? Thanks!

The purpose of master binary logs in delayed replication (1 reply)

$
0
0
Hi

I need to setup a master-slave replication schema with a 24 hours replication delay.
Now , due to space constraints , I need to know if 24 hours of binary logs need to be saved on the master or only the relay logs need to be on the slave side

As far as I understand , the master binary logs are being transferred to the slave immediately , and stored there as relay logs , waiting for the delay to expire
If this is the case - why do we need the master logs to stay online until the 24 hours expire ?

I did the following test :

set a 24 hours delay
created some load on the master and flushed logs few times
purged a log that was already transferred to the slave
reset the delay
got an error that the master log is missing.

I dont understand why the master log is needed by the slave , if it was already transferred to the slave and the data is sitting in the relay log waiting for apply.
Am I missing something ?

thanks
Orna

Users don't seem to replicate... Am I crazy or doing it wrong? (no replies)

$
0
0
I am running 2 MySQL servers and they are both masters and both slaves to each other. So if one goes down, the other takes over and my user's keep getting their data in both update and select modes.

Today, I had to shut down the main database I use as the real master and all of a sudden, one of my databases couldn't be accessed because the user I had created didn't exist on the second server.

I created the database, tables and user on server 1 and all of the tables exist on server 1 and server 2. But when I tried to access the tables on server 2 using the same user as I did when accessing them on server 1, I got an error.

I created the user manually on server 2 and everything started working (after applying grants of course)

So, is this normal? This is the first new user I have created since starting replication. Previously I created them all on server 1 but then copied the entire database to server 2 before starting replication. So did I create the user wrong? Is there a special setting to cause user/grants to replicate? Or was this just a fluke?

Thanks!

Replication - single vs multiple databases, many databases or many tables (1 reply)

$
0
0
Hello everyone,

I have some problems with replication on Mysql 5.6.27.

Is better to split all tables between multiple databases or better is to use the single database with a lot of tables inside (from replication perspective) or it doesn't matter?

For example will it help if I split my tables (+- 100 tables, some of them +- 50 mln records) between e.g. 5 databases or it doesn't matter?

also my master has a few cores and each one is used heavily (+- 80% resources is used on every core) but on Slave I have similar hardware but only 1 core is used (+-80%), the other ones are used in only 10%.

Many thanks for any advices Regards, S

Upgrading a GTID-based MySQL 8.0 multi-master replication (no replies)

$
0
0
Hello,

I'd like to perform a MySQL upgrade from version 8.0.12 to 8.0.14 in a multi-master replication scenario with two servers. We're running Windows Server with GTID-based replication.

The MySQL manual doesn't cover upgrading such a scenario very well. Can anyone tell me which steps in which order have to be performed? It would be great if you could describe the upgrade process as detailled as possible. Please consider running mysql_upgrade.

Thank you so very much for your help.

All the best,

Ben

Replication problem - delay. SHOW SLAVE STATUS to interpret. (no replies)

$
0
0
I have some problems with replication on Mysql 5.6.27.

Sometimes I see huge delay in synchronisation between Master and Slave.

I'm attaching my SHOW MASTER and SHOW SLAVE STATUS.

What may be a source of this problem in my case?

************************** MASTER STATUS **************************
File: mysql-bin-log.042471
Position: 547150564
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:


************************** Slave status **************************
Slave_IO_State: Waiting for master to send event
Master_Host: host
Master_User: user
Master_Port: port
Connect_Retry: 60
Master_Log_File: mysql-bin-log.042471
Read_Master_Log_Pos: 639210911
Relay_Log_File: mysql-relay-bin.004287
Relay_Log_Pos: 577683595
Relay_Master_Log_File: mysql-bin-log.042467
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 577683428
Relay_Log_Space: 4934228238
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 3609
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error: Replicate_Ignore_Server_Ids:
Master_Server_Id: 101
Master_Info_File: /data/real/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Waiting for Slave Worker to release partition
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0


Many thanks for help!
Regards
S

need help for version 8.0.15 group replicaton (no replies)

$
0
0
hi,dear all.

I use mysql-8.015 to setup a Group Replication cluster.It is a Single Master group with 3 nodes.I follow the advice here (https://mysqlhighavailability.com/setting-up-mysql-group-replication-with-mysql-docker-images/). After setup the cluster run up normally. node1 is the master ,node2 and node3 are the slaves;


I want to test some GR fault tolerance scenarios.I just use "docker kill node3" and then insert some data on node1.


mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| group_replication_applier | 28e9a66d-26b1-11e9-9f6b-0242ac130002 | node1 | 3306 | ONLINE | PRIMARY | 8.0.15 |
| group_replication_applier | 28f0fb75-26b1-11e9-9f22-0242ac130003 | node2 | 3306 | ONLINE | SECONDARY | 8.0.15 |
| group_replication_applier | 28f26da5-26b1-11e9-a080-0242ac130004 | node3 | 3306 | ONLINE | SECONDARY | 8.0.15 |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
3 rows in set (0.00 sec)

mysql> insert into test.t1 values(2,'hws2');

then the node1 has no response. I change to node2 and check the cluster status.


mysql> mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| group_replication_applier | 28e9a66d-26b1-11e9-9f6b-0242ac130002 | node1 | 3306 | UNREACHABLE | PRIMARY | 8.0.15 |
| group_replication_applier | 28f0fb75-26b1-11e9-9f22-0242ac130003 | node2 | 3306 | ONLINE | SECONDARY | 8.0.15 |
| group_replication_applier | 28f26da5-26b1-11e9-a080-0242ac130004 | node3 | 3306 | UNREACHABLE | SECONDARY | 8.0.15 |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
3 rows in set (0.00 sec)

mysql>

I double check the steps and get the same result!

Because I am a newbie , maybe I miss something Important . So I download the version 8.0.13 and repeat the steps just as what I do with 8.0.15. The 8.0.13 cluster just work fine !

mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | RSION |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| group_replication_applier | 174c7349-269d-11e9-9ca0-0242ac130002 | node1 | 3306 | ONLINE | SECONDARY | 8.0.13 |
| group_replication_applier | 17531092-269d-11e9-a16f-0242ac130003 | node2 | 3306 | ONLINE | PRIMARY | 8.0.13 |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
2 rows in set (0.00 sec)



Is something change in 8.0.15 and I miss in setup steps? Looking forward to your reply,thanks!




The init docker command is just like this:

for N in 1 2 3
do docker run -d --name=node$N --net=groupnet --hostname=node$N \
-e MYSQL_ROOT_PASSWORD=mypass \
mysql/mysql-server:8.0.15 \
--server-id=$N \
--log-bin=binlog \
--relay-log=node$N-relay-bin \
--binlog-format=ROW \
--enforce-gtid-consistency='ON' \
--log-slave-updates='ON' \
--gtid-mode='ON' \
--transaction-write-set-extraction='XXHASH64' \
--binlog-checksum='NONE' \
--master-info-repository='TABLE' \
--relay-log-info-repository='TABLE' \
--plugin-load='group_replication.so' \
--relay-log-recovery='ON' \
--group-replication-start-on-boot='OFF' \
--group-replication-group-name='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' \
--group-replication-local-address="node$N:33061" \
--group-replication-group-seeds='node1:33061,node2:33061,node3:33061'
done

Help understanding Master Slave replication behavior (no replies)

$
0
0
Hello MySQLers,

I'm new here and trying to understand the intricacies of MySQL Master Slave replication in version 5.5.

My current understanding/setup (please correct me where I'm wrong):

- GRANT statement updates the 'mysql' system database.
- In replication, master writes all transactions to binlog file, from which slave reads and copies to relay log file. The relay log file is then used to execute statements on slave.
- Setting binlog-do-db = mydb would tell master to only copy changes affecting mydb to binlog file.
- Not setting replicate-do-db or replicate-ignore-db on slave would execute all statements irrespective of DB from relay log file.

My problem with above setup:

Replication on slave failed with the following error
Last_Error: Error 'Table 'notmydb.sometable' doesn't exist' on query. Default database: ''. Query: 'GRANT SELECT,UPDATE on notmydb.sometable TO 'user'@'IPAddress' IDENTIFIED BY 'password''

My question:

- Why did master copy statements to be executed on 'mysql' database to binlog when I explicitly set it to copy only statements affecting mydb.

Thank you for consideration.

Kind regards,
Pavin Joseph.

large amount of Files in c:\programdata\mysql\mysql server 8.0\data (1 reply)

$
0
0
I have a new install of mysql8.0 and I am grabbing data from an old table out of necessity using Navicat and I am getting a large amount of files in the c:\programdata\mysql\mysql server 8.0\data directory that is filling up the drive. The files are named BBGL7CDH2-bin.###### and currently from 000083-000224.
In my research I have found that I can delete these and have tried both the mysql> PURGE BINARY LOGS TO and the mysql> PURGE BINARY LOGS BEFORE commands only to receive the message that the Target log is not found in the binlog index. So I looked at the index file and all of the files above are are listed in that index. So I researched that problem and I have found the RESET MASTER command that was suggested but that does not do anything either. I ran into this problem once before and I naively deleted the files and had to scramble to get it working once again

So at this point I am stuck and need to still clear off this data so that this unit does continue working. In a jam here and need some guidance if you will.

Replicate_Ignore_DB error WHY? (no replies)

$
0
0
I setup a slave to ignore a bounch of DBs
Slave mysql starts up w/o problem
then when I start slave I get an error
It try to replicate a statement from one of the db I told to ignore
what's going on here?
WHY?

Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB: (all_landing, astro_landing, bc_landing)
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1032
Last_Error: Could not execute Update_rows event on table all_landing.alpo_stat; Can't find record in 'alpo_stat', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log box213-37-bin.000089, end_log_pos 833866264

MySQL 8.0: Group Replication – Consistent Reads Deep Dive (no replies)


When will 5.7.26 release (no replies)

Cannot grant users (no replies)

$
0
0
Hi Group
I have a large Replication setup.
Unfoirtunably I had a PC with defect HD - so I installed a new PC.

But now I reloaded the Dump from the OLD harddisk - and now wanting to setup the Users for Insert data and allso replication.
I've now tried with both standard and sha256 password - But are given error 1045 no matter what!
I set the Connection - and trying to connect from slave SRV - Buyt still getting this error 1045 -- I testet the ports which are open throiugh telnet - But Cannot get any detailed setup.
I check with other setups -which are the exact same setting on user setup.

How can I test this further and make it work again ?

Issue reconnecting group replication servers after connection issue. (no replies)

$
0
0
Hello,

I administer a 3 server multi-primary MySQL Community Server (8.0.15) group replication cluster, and recently have run into an issue after a server was disconnected due to a network connection problem.

In the past, if a server got knocked out of the cluster and wouldn't rejoin, I would rebuild the server from scratch, starting with no data, and connect it to the group. After some time, it would replicate all of the database information and become a healthy member of the cluster. I have done this process a handful of times and have step by step documentation which was working until recently.

Now, it seems I can no longer do this process because the cluster has existed for awhile, and the binlogs no longer go back to the beginning of time, I get an error that the master is missing binlog data and I need to replicate the transactions from elsewhere. So, I decided to try importing a .SQL dump from a cluster member and resume the group replication afterward.

Unfortunately this is not working. I have completed these steps:
- Cleared all MySQL data starting from an empty server.
- Imported a recent .SQL dump from another server on the replication group.
- Attempted to connect to the cluster (CHANGE MASTER with the rpl_user and group_replication_recovery channel specified).
- START GROUP_REPLCIATION;

My thinking is it should try to resume replication from the last transaction GTID in the .SQL dump.

Now I am getting the following error connecting to the cluster:
2019-04-09T02:51:32.775763Z 40 [ERROR] [MY-013328] [Repl] Plugin group_replication reported: 'The certification information could not be set in this server: 'Certification information is too large for transmission.''
2019-04-09T02:51:32.775789Z 40 [ERROR] [MY-011624] [Repl] Plugin group_replication reported: 'Error when processing certification information in the recovery process'
2019-04-09T02:51:32.775798Z 40 [ERROR] [MY-011620] [Repl] Plugin group_replication reported: 'Fatal error during the recovery process of Group Replication. The server will leave the group.'


I have been unable to find any detailed documentation on what this error means. I feel like I am the only person on the entire Internet to encounter it, at least looking at Google results.

My educated guess was that it's related to max_allowed_packet, but I set this and slave_max_allowed_packet to 1GB and it still does the same thing.

How can I get group replication going again now from this point?

There is hardly anything in the logs on the working server, it just says it's removing this server from the group and no data on why.


Also -- if my process is bad, please advise how I should be doing this.

Frankly, most of the documentation out there on Group Replication seems to be very entry level "how to start your cluster" type instructions, and I question how many people are even using this in production environments at this point...

Let's say I buy another server and want to expand my cluster, what's the proper way to join a new server to my cluster now that joining an empty server with no data doesn't work anymore? Any guide out there on this process that I may be missing?


Thank you!
Kirk

REG: COUNT_RECEIVED_HEARTBEATS IS ZERO (no replies)

$
0
0
HI,
MY MYSQL 8.0 INNODB CLUSTER WAS WORKING FINE.BUT IN REPLICATION_CONNECTION_STATUS TABLE THE COUNT_RECEIVED_HEARTBEATS VALUE IS ZERO. AND I NEED TO KNOW TO GET VALUES IN THE COUNT_RECEIVED_HEARTBEATS COLUMN

Problems with Replication (no replies)

$
0
0
For a test setup - I having issue regarding replications between 2 different servers - The setup
Server A - have a DB created called Generic_Data - Channel 'SRVB'
Server B - have a DB called autolog - Channel 'SRVA'

The replication setup
Server A replicates autolog from Server B ( without problems) through channel SRVB
Server B - should replicate Generic_Data - but nothing happends through channel SRVA

My Specifc details:
log-bin =mysql-bin
binlog_do_db = Generic_Data,autolog
replicate-do-db = SRVB:autolog,SRVA:Generic_Data

My Channels are connecting fine on both ends - BUT I'm only replicates data through SRVB --> Autolog. Nothing the other way back!

I mysql error log I can see both channels are connecting on the master

Slave I/O thread for channel 'SRVB': connected to master 'mysql_replic@192.168.10.61:3306',replication started in log 'mysql-bin.000068' at position 542538
Slave I/O thread for channel 'SRVA': connected to master 'generic_replic@192.168.10.53:3306',replication started in log 'mysql-bin.000074' at position 4

And no other error in logfile.
I have tried to setup the replication with an existing DB
And allso started up the Replication channel SRVA befo9re creating DB and table in Generic_Data - But no matter what I cannot get it to replicate the orther channel channel - ONLY SRVB is collecting Data - And even though I can see the POS is moving - no new data is replicated from SERVER A to SERVER B
Viewing all 1561 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>