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

Replication to Another (MSSQL) (1 reply)

$
0
0
Im using MYSQL and MSSQL. I have one critical question ? Replication posibble between two different engines ???


Seher
Assistant

www.vizeavrupa.com

Replication MySQL 5.1 and Mysql 5.7 (1 reply)

$
0
0
Hello,

I would like to know if I can install MySQL 5.7 with replicate a server turn with MySQL 5.1. the resaon is we have a server in production; it's turn on MySQL 5.1 but we would like to use a new version for replication. Do you think, it's functionnal ?
Thanks for your advice.
Regards,

GitHub: MySQL High Availability at GitHub (no replies)

Group replication single primary manually change master? (no replies)

$
0
0
Is it possible to promote a specific master manually in group replication in a single primary environment aside from taking down the current master.

Re-sync slave without lock master (no replies)

$
0
0
Hi, I've a simple Mysql Replication environment.

Master configuration (ver. 5.7.21):
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
bind-address = 192.168.97.54
symbolic-links=0

server-id = 1
log_bin = /var/lib/mysql/mysql-bin.log
relay_log = /var/lib/mysql/mysql-relay-bin
expire_logs_days = 4
binlog-format = mixed

max_allowed_packet = 16M
ignore-db-dir=lost+found
innodb_buffer_pool_size = 2048M
innodb_log_file_size = 32M
max_connections = 500
sql-mode = ""

Salve configuration (ver. 5.7.21):
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
bind-address = 192.168.97.56
symbolic-links=0

server-id = 2
log_bin = /var/lib/mysql/mysql-bin.log
relay_log = /var/lib/mysql/mysql-relay-bin
expire_logs_days = 4
binlog-format = mixed
log-slave-updates = 1
skip-slave-start

max_allowed_packet = 16M
ignore-db-dir=lost+found
innodb_buffer_pool_size = 3072M
innodb_log_file_size = 32M
max_connections = 500
sql-mode = ""

I need to re-sync the slave, so, on the master I run:
mysqldump -p --skip-lock-tables --single-transaction --flush-logs --hex-blob --replace --master-data -A > /tmp/dump.sql

Then dump process takes 25 minutes.

After, on the slave, I import the dump and START SLAVE but I get, every time, the slave error 1062 so every time the replication is broken.

I try to skip the error, but I got severals same error.
how to re-synch master and slave without lock tables?

Thanks a lot
Stefano

MySQL warning “IP address 'x.x.x.x' could not be resolved: No such host is known” (1 reply)

$
0
0
I've MySQL 5.7.22 install on Windows server 2008 R2
There are many Warning like this
IP address 'x.x.x.x' could not be resolved: No such host is known

I search the problem on Google about two days. I means I'm not a free-rider I spend much time on MySQL 5.7 manual, I still don't know which policy or setting will help me fix the problem.

On "serverfault" some one with same problem, and some guys gives suggestion:

"I think it's a very very bad Idea to expose your database servers directly on the internet. If you are replicating to a remote host and need internet access to achieve that, I suggest you setup a VPN between the two networks and bind your MySQL servers to listen only to the local network.
If both of your hosts are on the same local network, you will be safe to bind your mysql servers to that network."

But I don't know how to do that, is there any example or tutorial
Thanks

what is the best option for local and cloud replicas of MySQL (no replies)

$
0
0
Hi All

Looking to setup 2 apps, one local and one cloud accessing the same data. I need to be able to replicate between the online and local mysql replicas realtime, is this possible and if so what is the best cloud platform to use?

GTID Replication failure - see transaction and user? (no replies)

$
0
0
OS: Ubuntu 16.04
MySQL Server: 5.7.22 (MySQL APT repository)

We have a round-robin master-slave GTID replication. Each application has is suppose to have its own master server. Occasionally we have a replication stoppage because a table is missing a record. Usually it's a DELETE or UPDATE transaction. We have been trying to track down the source of this issue and we suspect one of our applications is erroneously using the wrong master server. Is there a way to view the transaction in the relay log and the user that initiated it? The user will help us narrow down the application as each application uses a unique user login.

One to Many Multi Master Bi Directional Replication (no replies)

$
0
0
Hello

I have a server A ( Web Server ) with 1000 tables, Synology NAS Servers for each branch. Each NAS server has 100 tables ( i,e 1-100 for NAS1, 101-200 NAS 2, 201 - 300 NAS 3 etc).

Now I want to replicate data between Webserver to NAS's and NAS's to Webserver. What ever changes made in NAS has to be replicated in Webserver and changes made in Webserver has to be replicated to NAS again. I used multi source topology but it worked from one way only. I used master to master but it worked only for one NAS.

Could any help me in sorting this replication issue.

Thanks in advance

Making the original master a slave after a crash (no replies)

$
0
0
I have two mysql dbs (5.7) setup as master and slave. In the event master crashes, I promote the slave to be master (new master). When I bring back the mysql process on original master, I make him a slave by running

CHANGE MASTER TO MASTER_HOST='<ip of new master>',MASTER_USER='slave', 
MASTER_PASSWORD='password',MASTER_LOG_FILE='mysql-bin.000001', 
MASTER_LOG_POS=  77;
start SLAVE;

If my original master is down for 2 hours, how do I ensure any updates that were sent to the new master during that 2 hours are copied from new master to new slave?

Thanks
Ravi

MYSQL 8.0 - Group Replication - Error on Start up (no replies)

$
0
0
We are trying to configure group replication in MySQL 8.0 with two machines. We made the following config entries,

[mysqld]
server-id=1
log-bin = /var/lib/mysql/mysql-bin
basedir=/var/lib
relay-log = /var/lib/mysql/mysql-relay-bin
relay-log-index = /var/lib/mysql/mysql-relay-bin.index
relay-log-info-file = /var/lib/mysql/mysql-relay-log.info
max_connections = 1000D

plugin_dir=/usr/lib64/mysql/plugin

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

gtid_mode=ON
enforce-gtid-consistency=ON
binlog_checksum=NONE

log_slave_updates=ON
binlog_format=ROW
master_info_repository=TABLE
relay_log_info_repository=TABLE

transaction_write_set_extraction=XXHASH64
loose-group_replication_group_name="f4c300ce-a156-11e8-a825-00e07c7e1047"
loose-group_replication_start_on_boot=off
loose-group_replication_local_address= "192.168.100.183:3306"
loose-group_replication_group_seeds= "192.168.100.183:3306,192.168.100.188:3306"
loose-group_replication_bootstrap_group=off

Also created a new user, gave full permission to that user id and changed it to the master user id using the following command,

CHANGE MASTER TO MASTER_USER='mygroup', MASTER_PASSWORD='######' FOR CHANNEL 'group_replication_recovery';

Then installed group replication plugin using the following command,

INSTALL PLUGIN group_replication SONAME 'group_replication.so';

Then executed the following commands,

SET GLOBAL group_replication_bootstrap_group=ON;
START GROUP_REPLICATION;

At this point we are getting the following error,

ERROR 3094 (HY000): The START GROUP_REPLICATION command failed as the applier module failed to start.

What could be the issue..? Kindly assist...

Upgrade master-master replication (no replies)

$
0
0
Hi all,

We'd like to use a row-based master-master replication scenario with MySQL 8.0 using GTIDs.

I'm not pretty sure how to perform MySQL upgrades in our case. After reading the documentation, I think these steps might work, but maybe I mixed something up:

1) stop first master and perform the following steps on it

2) replace MySQL binaries

3) start server with --skip-networking and --skip-slave-start options

4) execute SET sql_log_bin = 0

5) run mysql_upgrade

6) execute SET sql_log_bin = 1

7) repeat steps 1 to 6 for second master

8) restart both masters without --skip-networking and --skip-slave-start options

Please tell me if my planned proceeding is right.

Thanks so much for your help.

All the best,

Ben

Master/(Master Slave) Replication setup (no replies)

$
0
0
Hello,
I have 3 servers - A, B and C. A and B are master/master setup. C is slave to B. If B is down, can I promote C master and start replicating between A and C (Master/Master) without rebuilding A or C?

Thank you

Group member stuck recovering (no replies)

$
0
0
Hey guys,

MySQL 8.0.11 with 3 members: one is stuck in recovering and does not show any error messages.

I have restarted the whole group, but to no avail.

Is there away to "nicely" reset a member so it can "cleanly" rejoin? So not removing filesystem files and start over. Any "RESET GROUP_MEMBER" kinda thingy/magic?

Cheers,
Geert

mysql 8.0.12 group replication (no replies)

$
0
0
Hello ! I follow the official documentation after the configuration completes group replication , insert a new record in the table, the standby node is not synchronized, the log shows
-------------------------------------
[Warning] [MY-010956] [Server] Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp. This may be an issue if delayed replication is active. Make sure that servers have their clocks set to the correct time. No further message will be emitted until after timestamps become valid again.
--------------------------------------

Both the master and the standby time are the same. Gtid_exec is the same, I don't know what's going on, please help.

5.7.23, M-M replication,secondary node memory leak (no replies)

$
0
0
Environment
OS:rhel 6.5 x64
MySQL:5.7
Melloc:jemalloc 5.1.0
Replication:master <=> master(MTR 4 threads) + keepalived

---------------------------------------------------
Problem
The first node(primary) is running normally.
The secondary node(read only), memory usage has been rising.
The EVENT "sql/Log_event"(slave_sql), memory usage has been rising.

root@150203 [(none)]> select THREAD_ID, EVENT_NAME, COUNT_ALLOC, SUM_NUMBER_OF_BYTES_ALLOC/1024/1024, CURRENT_NUMBER_OF_BYTES_USED/1024/1024 from performance_schema.memory_summary_by_thread_by_event_name order by CURRENT_NUMBER_OF_BYTES_USED desc limit 10;
+-----------+----------------------------+-------------+-------------------------------------+----------------------------------------+
| THREAD_ID | EVENT_NAME | COUNT_ALLOC | SUM_NUMBER_OF_BYTES_ALLOC/1024/1024 | CURRENT_NUMBER_OF_BYTES_USED/1024/1024 |
+-----------+----------------------------+-------------+-------------------------------------+----------------------------------------+
| 1 | memory/innodb/buf_buf_pool | 240 | 31455.00000000 | 31455.00000000 |
| 507 | memory/sql/Log_event | 18400264 | 7564.47873688 | 7564.39571095 |
| 1 | memory/innodb/hash0hash | 92 | 2356.76754761 | 897.66287231 |
| 1 | memory/innodb/os0event | 5899209 | 765.12567902 | 765.12567902 |
| 506 | memory/innodb/std | 38099468 | 1599.35388184 | 193.64311218 |
| 1 | memory/innodb/log0log | 11 | 64.01335907 | 64.01335907 |
| 508 | memory/innodb/std | 8876486 | 396.79184723 | 38.66751099 |
| 507 | memory/innodb/std | 1776900 | 74.58917236 | 9.03167725 |
| 509 | memory/mysys/IO_CACHE | 6 | 8.03128242 | 8.03128242 |
| 508 | memory/mysys/IO_CACHE | 6 | 8.03128242 | 8.03128242 |
+-----------+----------------------------+-------------+-------------------------------------+----------------------------------------+
10 rows in set (0.03 sec)

root@150203 [(none)]> select thread_id, user, current_allocated, total_allocated from sys.memory_by_thread_by_current_bytes;
+-----------+---------------------------------+-------------------+-----------------+
| thread_id | user | current_allocated | total_allocated |
+-----------+---------------------------------+-------------------+-----------------+
| 1 | sql/main | 32.42 GiB | 34.08 GiB |
| 507 | sql/slave_sql | 7.42 GiB | 12.10 GiB |
| 506 | sql/slave_io | 198.30 MiB | 100.58 GiB |
| 38914 | root@localhost | 8.53 MiB | 21.64 MiB |
| 510 | sql/slave_worker | 8.06 MiB | 8.21 MiB |
| 511 | sql/slave_worker | 42.74 KiB | 42.90 KiB |
| 39514 | root@10.25.150.203 | 16.84 KiB | 28.59 MiB |
| 39515 | root@10.25.150.203 | 16.84 KiB | 40.66 MiB |
| 39516 | root@10.25.150.203 | 16.84 KiB | 24.54 MiB |
| 3225 | repl@10.25.150.202 | 13.05 KiB | 63.97 KiB |
| 31 | innodb/buf_dump_thread | 192 bytes | 1.74 MiB |
| 30 | innodb/srv_worker_thread | 0 bytes | 0 bytes |
| 39 | sql/signal_handler | 0 bytes | 0 bytes |
| 40 | sql/compress_gtid_table | 0 bytes | 0 bytes |
| 2 | sql/thread_timer_notifier | 0 bytes | 0 bytes |
| 3 | innodb/io_read_thread | 0 bytes | 33.24 KiB |
| 4 | innodb/io_ibuf_thread | 0 bytes | 0 bytes |
| 5 | innodb/io_read_thread | 0 bytes | 27.16 KiB |
| 6 | innodb/io_log_thread | 0 bytes | 0 bytes |
| 7 | innodb/io_read_thread | 0 bytes | 5.67 KiB |
| 8 | innodb/io_read_thread | 0 bytes | 50.03 KiB |
| 9 | innodb/io_read_thread | 0 bytes | 44.77 KiB |
| 10 | innodb/io_read_thread | 0 bytes | 11.35 KiB |
| 11 | innodb/io_read_thread | 0 bytes | 22.70 KiB |
| 12 | innodb/io_read_thread | 0 bytes | 22.70 KiB |
| 13 | innodb/io_write_thread | 0 bytes | 1.68 MiB |
| 14 | innodb/io_write_thread | 0 bytes | 384.44 KiB |
| 15 | innodb/io_write_thread | 0 bytes | 650.33 KiB |
| 16 | innodb/io_write_thread | 0 bytes | 223.01 KiB |
| 17 | innodb/io_write_thread | 0 bytes | 294.46 KiB |
| 18 | innodb/io_write_thread | 0 bytes | 218.54 KiB |
| 19 | innodb/io_write_thread | 0 bytes | 274.54 KiB |
| 20 | innodb/io_write_thread | 0 bytes | 242.21 KiB |
| 21 | innodb/page_cleaner_thread | 0 bytes | 0 bytes |
| 23 | innodb/srv_error_monitor_thread | 0 bytes | 0 bytes |
| 24 | innodb/srv_lock_timeout_thread | 0 bytes | 0 bytes |
| 25 | innodb/srv_monitor_thread | 0 bytes | 18.92 MiB |
| 26 | innodb/srv_master_thread | 0 bytes | 14.24 MiB |
| 27 | innodb/srv_worker_thread | 0 bytes | 0 bytes |
| 28 | innodb/srv_purge_thread | 0 bytes | 0 bytes |
| 29 | innodb/srv_worker_thread | 0 bytes | 0 bytes |
| 32 | innodb/dict_stats_thread | -160 bytes | 218.36 KiB |
| 509 | sql/slave_worker | -5122994 bytes | 58.06 MiB |
| 508 | sql/slave_worker | -7894888734 bytes | 28.29 GiB |
+-----------+---------------------------------+-------------------+-----------------+
44 rows in set (0.28 sec)

Suggestion for the master-master cross datacenter. (no replies)

$
0
0
I am new to mysql and need help for the following setting:

The layout.

DC1: A1 A2
DC2: S1 S2

A1, A2 are the two mysql servers in datacenter 1, which is master-master, and hosted two database (db01, db02)
S1, S2 are the two mysql servers in datacenter 2, which is master-master, and hosted two database (db02, db01)

db01 in A1/A2 is used by the application1 in DC1, db01 in S1/S2 is for the standby.
Similiarly, db02 in S1/S2 is used by the application2 in DC2, db02 in A1/A2 is for the standy.

In case datacenter 1 goes down, "standby" application1 (in dc2) will use the standby db01 in DC2. Later after DC1 recovered, we need to be able to sync db01 from dc2 to dc1 from dc2.

How can we sync? (two-way replications/sync?) Could you help to provide some advice? Steps will be more helpful.

Adding a new server to Replication Group from mysqldump (no replies)

$
0
0
Hi,
With a long history it is not as convenient to add a new blank server but copy the databases and continue the replication well into the future.

With Masters and Slaves you would:

lock tables,
record the log_file and log_pos
mysqldump an old master
unlock tables
splat the databases onto the new server
set the log_file and log_pos
start the slave/master

But things seem different now and attempting this has met me with failure. Any advice?

Sluggish replication; Linux Kernel 4.15.0-36 (1 reply)

$
0
0
OS: Ubuntu 16.04.03 x64
MySQL: 5.7.23-community (MySQL ppa repo)

Anyone else running Ubuntu 16.04.3 with kernel 4.15.0-36-generic and having sluggish replication performance?

We have a MySQL farm of seven severs, all running Ubuntu on dedicated hardware. Ubuntu released kernel 4.15.0-36-generic last week and we rebooted this last weekend. Replication has been falling steadily behind since the reboot. There was no reason for it that we could see. The servers were not choaking under any load; network, storage, or CPU. Servers on the same network switch were up to hours behind in replication. This was something new. We have never really had a significant lag before - usually a minute or so was the worst we ever had. But hours?

There were no MySQL or OS configurations changes. All servers were updated to MySQL 5.7.23 on 2018-08-08 and have been running fine since that update.

The biggest indicator of the lag was "SLAVE RETRIEVED". It was way behind. "SLAVE EXECUTED" was keeping up but "SLAVE RETRIEVED" seem to not be downloading transactions from the upstream host with any urgency.

Long story short, we eliminated the physical network and concluded it had to be an OS update. We restarted one server using kernel 4.15.0-34-generic and the server caught up replication in just a couple of minutes!

binlog incomplete.Missing some databases's record (no replies)

$
0
0
in mysql-audit.log ,we found some records about c_bet.but we couldn't find any record that contain "c_bet" in every each of binlog files.
Could any one help me with this ? I cloudn't find any clue on the internet.
post a message here is my last hope...

here is my.cnf:
[mysqld]
symbolic-links=0
innodb_buffer_pool_size=4G
key_buffer_size=1G
max_connections=3000
max_connect_errors=100
expire_logs_days=30
log-bin = /binlog/mysql-bin
skip-name-resolve
basedir=/usr/local/mysql
datadir=/mysql/data
port = 3306
server_id=117
socket=/tmp/mysql.sock
sql_mode=""
# mysql-audit
plugin-load=AUDIT=libaudit_plugin.so
audit_validate_checksum=ON
audit_json_file=ON
audit_uninstall_plugin=ON
audit_offsets=7800, 7848, 3624, 4776, 456, 360, 0, 32, 64, 160, 536, 7964
#审计日志文件绝对路径
audit_json_log_file=/tmp/mysql-audit-3306.log
#需要审计的命令
audit_record_cmds= drop,alter,update,delete,insert
[mysql]
socket=/tmp/mysql.sock


this is the master ,and on the slave,I run the "show slave status \G;" command,it shows the master-slave replication is ok.

really appreciate if you could help
Viewing all 1562 articles
Browse latest View live


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