Quantcast
Channel: StackExchange Replication Questions
Viewing all 17268 articles
Browse latest View live

Kafka Replication factor increase post issue

$
0
0

I am using a 3 broker Kafka cluster in prod. Earlier the replication factor was 2 . Now I want to increase the replication factor to 3. I have executed the kafka-reassignment-partions.sh file and it go executed successfully. Post execution when I am executing the describe command it is showing 3 brokers in the ISR list , but for all partions , I am having the same leader (Broker 1 as the Leader).

Please suggest


Using mysqldump to initialize slave database

$
0
0

I've facing an issue I don't really understand.

I wan't to synchronize a slave MariaDB database to a master one.

I try to use the mysqldump option --master-data=1 which is adding a "CHANGE MASTER TO" in the output file to set the bin log file and position for the slave. I'm assuming (as per the doc) than it should be enough for the slave to know where to start. When I import the file to the slave and start slave, the slave is desynchronized

If I do a "FLUSH TABLES WITH READ LOCK;", SHOW MASTER STATUS etc then at the end manually do a "CHANGE MASTER TO", all if fine and synchronized

I would assume the --master-data=1 would generate the same bin log information as the manual way, but it is not.

Where am I going wrong ?

Is MS CDC possible as an ongoing replication for RDS managed SQL Server without sysadmin permissions?

$
0
0

My industry is planning to upgrade from SQL Server 2012 to SQL Server 2016 (standard editions both), after that we plan to do replication of our prod db. We went through few AWS docs which says:

AWS DMS provides comprehensive ongoing replication of data, although it replicates only a limited amount of data definition language (DDL). AWS DMS doesn't propagate items such as indexes, users, privileges, stored procedures, and other database changes not directly related to table data.

Also:

Unlike self-managed SQL Server sources, Amazon RDS for SQL Server doesn't support MS-Replication. Therefore, AWS DMS needs to use MS-CDC for tables with or without primary keys.

Can anyone suggest what our options are given this limitation? How do we get it to work?

Is MS CDC possible on RDS managed SQL Server Standard Edition? I also read in same AWS document like:

Also, Kindly suggest on how to proceed on above or if someone has already been through similar experiences.

I read that MS replication is not possible.

Can't promote PostgreSQL warm standby server to start serving data

$
0
0

Scenario:

  • Two CentOS 7 machines, with ips 10.0.2.15 and 10.0.2.4
  • Both running PostgreSQL 9.4.6. First one (10.0.2.15) as master, and second one (10.0.2.4) as slave, not listening for clients (just mirroring data via WAL shipping).

Problem: I can make log shipping work (so, slave receives WAL files), but I cannot promote slave to accept connections.

What I did:

In master:

Created user for replication from slave:

psql -c “CREATE USER rep REPLICATION LOGIN CONNECTION LIMIT 1 ENCRYPTED PASSWORD ‘replication’;”

Allowed slave to connect as replication user, with this line in pg_hba.conf:

host    replication    rep    10.0.2.4/32    md5

postgresql.conf:

wal_level = archive
archive_mode = on
archive_command = 'rsync -av %p postgres@10.0.2.4:/var/lib/pgsql/9.4/archive/%f —exclude=postmaster.pid'
max_wal_senders = 3 # Using just 1, but anyway...

In slave:

Deleted data repository

rm -fr /var/lib/pgsql/9.4/data

Made a base backup

pg_basebackup -h 10.0.2.15 -D /var/lib/pgsql/9.4/data -U rep -v -P

(I enter the password, and the base backup is properly made: new data directory now)

Added recovery.conf to new data directory just created. With this info:

standby_mode='off'
restore_command='pg_standby /var/lib/pgsql/9.4/archive %f %p %r'

Directory /var/lib/pgsql/9.4/archive exists in the slave, and it's writable for postgres.

So, the master-slave process is working. WAL files are being sent via rsync. But if I just try this in slave:

pg_ctrl promote

I get the message "server promoting", but nothing happens. And no new messages in the log. Still can't connect to the server via psql. No incoming connections accepted.

What should I do to promote the slave to serve data as a normal server? I'm talking about a high availability scenario, with a warm standby server starting to act as a normal server, allowing clients to connect.

I know I can change parameters in the slave to make it run as normal server, but I just think there should be a quick way to put my slave server to work. I thought it was just pg_ctl promote. But probably, I'm missing something.

Any clues?

Database with many publication, How to make snapshots for publications run faster

$
0
0

I have a database that has about 200 filtered publications. When we run snapshots it drags down the merge processes and it takes a long time to recover because of the locks.

  1. Is there a way to create a snapshot on a busy database without slowing down the running subscriptions.

  2. what would be the impact of snapshot isolation. ( I realize its not talking about the actual snapshot)

MongoDB unrecoverable replication error

$
0
0

One of member of my MongoDB replica set decided it would not restart, with the following error (reformatted for readability):

Starting rollback due to OplogStartMissing: 
our last op time fetched: (term: 30, timestamp: Jul 28 07:45:11:6) 
source's GTE:             (term: 31, timestamp: Jul 28 07:45:11:7)

Fatal assertion 18750 UnrecoverableRollbackError
                          (term: 31, timestamp: Jul 28 07:45:12:2) > our last optime: 
                          (term: 30, timestamp: Jul 28 07:45:11:6)

Let's call the instance where this happens M1, and the source its trying to sync M2. M1 used to be primary, then the primary switched to M2, and M1 restarted.

The naive interpretation of these log messages is that the first operation from M2's oplog is exactly the next operation after what we have applied in M1. So, we should just happily apply operations from M2, but MongoDB tries to rollback some operations, finds an operation in future relative to both what we've applied and what's next on M2, and dies.

I have two questions: first, why is MongoDB trying rollback in the first place, and second, where is operation with timestamp of Jul 28 07:45:12:2 is coming from?

Mysql thinks Master & Slave have the same server-id

$
0
0

I've been setting up a master->slave_a->slave_b relationship and having a little trouble. I currently have the master->slave_a replication working fine.

Each of the two slaves have exactly the same configuration, other than the hostname, server-id setting. When ever I try and start the slave on slave_b I have the following error pop up:

Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).

I really don't understand, because I have all of the server IDs miles apart 1->2626->2629 (m->s->s).

I'm setting them in my /etc/mysql/conf.d/replication.cnf file - and it seems to be being included, but I have no idea how I can check which server id mysql is picking up.

Thanks in advance :) Tom.

Replicate some tables without transferring the entire log

$
0
0

I have a mysql database that contains some tables with private information, and some tables with public information.

I would like to replicate only the tables containing public information from one database to another, making sure that NO confidential information ever gets stored on the slave.

I know I can use the replicate-do-table to specify that only some tables are replicated, but my understanding is that the entire bin log is transferred to the slave.

Is there a way to ensure that only the public information is transferred to the slave?

I am very hesitant to add another copy of the database to an existing server - I just don't think the existing server has the available capacity, in either RAM or CPU.


Very fast replication

$
0
0

I have used the Streaming Replication guide on the PostgreSQL Wiki to configure replication between my two db servers.

But, when I updated a row on master server it is available on the slave instantly. It should be asynchronous, isn't it? What I am missing?

Servers are in separate places. The master's upload speed is ~75kb/sec. As far as I know, first of all, 16MB xlog file should be upload to slave, after that transactions available on slave. But it is happening in 1 sec. Why is it so fast?

How to Upgrade Master Slave MySQL on AWS RDS?

$
0
0

I already have Master Slave configuration on AWS RDS. We want to upgrade 5.5 to 5.6.23. ..What should be correct sequence to Upgrade ?

  1. Upgrade Master ( Using Modify Instance ) --> Upgrade Slave
  2. Upgrade Master ( Using Modify Instance ) --> Create a new Read Replica ?

MySQL Galera Cluster mass update delay

$
0
0

I have migrated my single MariaDB setup to a 3 node Galera cluster. I am currently in staging and most of normal operations run fine.

I have one issue though: if I do a mass update of one column of one table (500K rows) then the new value is available on the node where I ran the SQL UPDATE immediately after the transaction is done while it takes several seconds to propagate to the other nodes.

I thought Galera cluster was 100% synchronous and thus suprised to see that as it means that users could see different data...

My conf is:

[mysqld]
binlog_format=ROW
default_storage_engine=InnoDB
innodb_flush_log_at_trx_commit=0
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
query_cache_size=0
wsrep_provider=/usr/lib/libgalera_smm.so
wsrep_provider_options="gcache.size=300M; gcache.page_size=300M"
wsrep_cluster_name="xxxxx"
wsrep_cluster_address="gcomm://192.168.0.100,192.168.0.101,192.168.0.102"
wsrep_node_address="192.168.0.102"
wsrep_sst_auth="sst:yyyyyy"
wsrep_sst_method=xtrabackup-v2
wsrep_on=ON

Is this really expected or is there something to tweak?

Thanks!

How to replicate specific tables between two MySQL database [duplicate]

$
0
0

This question already has an answer here:

I have two MySQL database A and B with same schema. I want to replicate some of the tables from database A to database B real-time. BUT,the other tables will not replicate between A and B, and most importantly they will have different data for other tables, which is significantly different with MySQL replicas.
How to achieve that?

mysql replication master-slave with 2 or more users in master

$
0
0

I've just configured mySQL replication master-slave. I have into master instance 3 user: root (with all privileges and grant), admin(with all privileges) and slaveUser(with replication salve privilege). I've configured slave server to, and if I modify (with root user) in my master instance some resource this are replicated into slave. Well, if I modify a resource, in master instance, with admin user this resource isn't modified into slave and I've this error

Error 'Can't find any matching row in the user table' on query. Default database: 'my_db'. Query: 'GRANT ALL PRIVILEGES ON . TO 'admin'@'%''

I've configured this on the same machine with 2 docker instances.

Any suggestions??

EDIT

This is my users on MASTER

+-----------+-----------+
| user      | host      |
+-----------+-----------+
| admin     | %         |
| root      | %         |
| userSlave | %         |
| mysql.sys | localhost |
+-----------+-----------+

and this is users on SLAVE

+-----------+-----------+
| user      | host      |
+-----------+-----------+
| root      | %         |
| mysql.sys | localhost |
+-----------+-----------+

Which kind of permission does admin need to write replication on slave??

EDIT add SHOW SLAVE STATUS

mysql> SHOW SLAVE STATUS\G;
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 172.17.0.3
                  Master_User: userSlave
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000001
          Read_Master_Log_Pos: 317959980
               Relay_Log_File: mysql-relay.000002
                Relay_Log_Pos: 5834
        Relay_Master_Log_File: mysql-bin.000001
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1133
                   Last_Error: Error 'Can't find any matching row in the user table' on query. Default database: 'mydb'. Query: 'GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%''
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 5621
              Relay_Log_Space: 317961680
              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: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 1133
               Last_SQL_Error: Error 'Can't find any matching row in the user table' on query. Default database: 'mydb'. Query: 'GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%''
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 100
                  Master_UUID: 8527301e-9765-11e5-a957-0242ac110003
             Master_Info_File: /var/lib/mysql/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: 
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 151215 20:26:46
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 
            Executed_Gtid_Set: 
                Auto_Position: 0
         Replicate_Rewrite_DB: 
                 Channel_Name: 
1 row in set (0.00 sec)

ERROR: 
No query specified

Unable to replicate a database

$
0
0

I setup a master slave replication, where the master has the following setup

datadir                = /mnt/DATADIR/

bind-address            = 0.0.0.0

binlog-ignore-db        = information_schema,mysql,performance_schema,sys
slave-skip-errors      = 1062,1452,1146
server-id              = 3
binlog-checksum        = none
log_bin                = /mnt/DATADIR/log-bin.log
expire_logs_days       = 10
max_binlog_size        = 100M

After restarting the master I check the binary log

mysql> SHOW MASTER STATUS;
+----------------+----------+--------------+-------------------------------------------------+-------------------+
| File           | Position | Binlog_Do_DB | Binlog_Ignore_DB                                | Executed_Gtid_Set |
+----------------+----------+--------------+-------------------------------------------------+-------------------+
| log-bin.000003 |      150 |              | information_schema,mysql,performance_schema,sys |                   |
+----------------+----------+--------------+-------------------------------------------------+-------------------+
1 row in set (0,00 sec)

I am running the following command on the slave to change the log position

SLAVE STOP; CHANGE MASTER TO MASTER_LOG_POS=150, MASTER_LOG_FILE='log-bin.000003'; SLAVE START;

The output on the slave

mysql> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: ...
                  Master_User: slave
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: log-bin.000003
          Read_Master_Log_Pos: 150
               Relay_Log_File: mysqld-relay-bin.000002
                Relay_Log_Pos: 266
        Relay_Master_Log_File: log-bin.000003
             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: 150
              Relay_Log_Space: 422
              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: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 0
               Last_SQL_Error:

Now testing the replication, I create a dummy schema on the master

mysql> create schema test4;
Query OK, 1 row affected (0,02 sec)

However when I am checking the output of the slave I am getting some error

mysql> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: ...
                  Master_User: slave
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: log-bin.000003
          Read_Master_Log_Pos: 302
               Relay_Log_File: mysqld-relay-bin.000002
                Relay_Log_Pos: 266
        Relay_Master_Log_File: log-bin.000003
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1594
                   Last_Error: Relay log read failure: 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.
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 150
              Relay_Log_Space: 574
              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: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 1594
               Last_SQL_Error: Relay log read failure: 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.
1 row in set (0,00 sec)

However when I am checking the binary log file everything seems fine:

mysqlbinlog log-bin.000003
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#160714  8:17:56 server id 3  end_log_pos 123   Start: binlog v 4, server v 5.7.12-0ubuntu1.1-log created 160714  8:17:56
# Warning: this binlog is either in use or was not closed properly.
BINLOG '
lC6HVw8DAAAAdwAAAHsAAAABAAQANS43LjEyLTB1YnVudHUxLjEtbG9nAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXwAEGggAAAAICAgCAAAACgoKKioAEjQA
AOAGcMo=
'/*!*/;
# at 123
#160714  8:17:56 server id 3  end_log_pos 150   Previous-GTIDs
# [empty]
# at 150
#160714  8:27:46 server id 3  end_log_pos 211   Anonymous_GTID  last_committed=0    sequence_number=1
SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;
# at 211
#160714  8:27:46 server id 3  end_log_pos 302   Query   thread_id=3 exec_time=0 error_code=0
SET TIMESTAMP=1468477666/*!*/;
SET @@session.pseudo_thread_id=3/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1436549152/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create schema test4
/*!*/;
SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;

What could be the problem? The master version is

mysql> SHOW VARIABLES LIKE "%version%";                                                                                                                                                                     +-------------------------+-----------------------+
| Variable_name           | Value                 |
+-------------------------+-----------------------+
| innodb_version          | 5.7.12                |
| protocol_version        | 10                    |
| slave_type_conversions  |                       |
| tls_version             | TLSv1,TLSv1.1         |
| version                 | 5.7.12-0ubuntu1.1-log |
| version_comment         | (Ubuntu)              |
| version_compile_machine | x86_64                |
| version_compile_os      | Linux                 |
+-------------------------+-----------------------+

And the slave version is

mysql> SHOW VARIABLES LIKE "%version%";                                                                                                                                                                     +-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| protocol_version        | 10                  |
| version                 | 5.1.73-log          |
| version_comment         | Source distribution |
| version_compile_machine | x86_64              |
| version_compile_os      | redhat-linux-gnu    |
+-------------------------+---------------------+
5 rows in set (0,00 sec)

Is there some new setting which needs to be set i the 5.7 version to be compatible with 5.1?

Schedule data from instance to instance have I maxed out tableDiff

$
0
0

We have a process which uses tablediff.exe. From one SQL Server 2008 R2 instance to another identical instance. It has worked very well for a long time! I have a situation where one table now has 10767594 records (and growing). So this table has been separated into its own job, its taking 2.5 hours to complete. How can I improve this?

The process is triggered by a Windows Scheduled Task which calls a .bat file.

My objective is to run this job every hour. Is there a ways to use table diff more effectively. EG if I capture the lastProcessedID can I run tableDiff next time for all records where id > lastProcessedID? Or is tableDiff just not the correct approach given the size of table now?

Please note I am not a DBA, I am an ASP developer (be gentle...).

As I said my objective is to run this job every hour. The source table from instance A can simply replace the data in the destination table/instance. I just need to update or replace one table in the destination with a table from the source. Any advice would be great? Thank you in advance

MY SOLUTION - This was a very very big surprise. The 10 million+ record table was identical on the source and destination except for 2 indexes (on the source). I applied the indexes to the source. Now I run the tableDiff job which has not been changed at all and it completes in under 2 minutes. 2.5 hours to 2 mins!

I guess tableDiff may not be a great long term solution. Will I need to implement some kind of incremental difference replication as suggested below since this table will continue to grow. At what point do you think tableDiff should be no longer used. A time factor, number of records ?


mysql slave replication doesn't work due to error 1236

$
0
0

My mysql master server has crashed due to storage issue. The issue has been fixed and the master is up and running. However, my slave has stopped to be replicated due to the error:Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'

Here is my slave status:

    mysql> show slave status\G;
*************************** 1. row ***************************
               Slave_IO_State: 
                  Master_Host: 192.x.x.x
                  Master_User: user
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000321
          Read_Master_Log_Pos: 3962375
               Relay_Log_File: mysql-relay-bin.000001
                Relay_Log_Pos: 4
        Relay_Master_Log_File: mysql-bin.000321
             Slave_IO_Running: No
            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: 3962375
              Relay_Log_Space: 106
              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: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 1236
                Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
               Last_SQL_Errno: 0
               Last_SQL_Error: 

And here is my master status:

mysql> show master status\G;
*************************** 1. row ***************************
            File: mysql-bin.000323
        Position: 103145634
    Binlog_Do_DB: 
Binlog_Ignore_DB: 
1 row in set (0.00 sec)

I can see that the specific binary log (mysql-bin.000321) doesn't exist on the master. The the log file itself exist on the server, but ain't shown by SHOW BINARY LOGS;.

mysql> SHOW BINARY LOGS;
+------------------+------------+
| Log_name         | File_size  |
+------------------+------------+
| mysql-bin.000314 | 1073742675 |
| mysql-bin.000315 | 1073742958 |
| mysql-bin.000316 | 1073742098 |
| mysql-bin.000317 |  631008456 |
| mysql-bin.000318 |   18007666 |
| mysql-bin.000319 |        125 |
| mysql-bin.000320 |  327413876 |
| mysql-bin.000322 |        125 |
| mysql-bin.000323 |  109150417 |
+------------------+------------+

Please advise.

SQL Server Merge Replication Computed Column Conflict Resolution

$
0
0

I'm setting up a merge replication web publication for a table that needs to use the DateTime (Later Wins) conflict resolver so that the most recently modified row wins in any conflict. This table (and hundreds of other tables) use a datetimeoffset for their modified date as subscribers can be in many timezones. In order to get the required datetime value as a column I've added a ModifiedDateUTC datetime computed column which does a simple CONVERT to a datetime. The issue I'm seeing is that even though the article setup accepts this as a valid column, whenever I generate a conflict I get the error 'The specified conflict resolution column 'ModifiedDateUTC' could not be found.'

MySQL5.6 Master Slave Replication Not Happening from Slave Side

$
0
0

OS : MySQL 5.6 & RHEL 7

I have one "Master" and "Slave" Machines & I am using "MySql" and "RHEL".

After rebooting mysqld in slave side, relay log showing differentiate in log & show slave status & replication not happening. Kindle do some favor.Waiting for your response.

I want replication should work properly from slave side.

Slave Logs

2018-04-16 04:23:47 24220 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000002' at position 120, relay log './mysqld-relay-bin.000035' position: 283

Slave Status

Slave_IO_State: Waiting for master to send event Master_Host: 192.168.10.10 Master_User: ali Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.000002 Read_Master_Log_Pos: 120 Relay_Log_File: mysqld-relay-bin.000037 Relay_Log_Pos: 283 Relay_Master_Log_File: mysql-bin.000002 Slave_IO_Running: Yes Slave_SQL_Running: Yes

How To Prevent Replication Failure

$
0
0

If I become a MySQL DBA, will I had to deal all day with those kind of issues or do you have tips to prevent from breaking the whole replication?

I received this message because I removed manually the database, and after that the php script remove it.

Last_SQL_Errno: 1133`
Error 'Can't find any matching row in the user table' on query.`

Snapshot Agent - Merge Replication: Failed to read from Server

$
0
0

We currently have Merge replication with 1 publisher and 2 subscribers. This morning I noticed the snapshot agent failed. I have tried to kick this off manually, but it keeps failing. The following is the error message that I get:

Error messages:
Message: Failed to read from server
Stack:    at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.ThrowNativeBcpOutException(CConnection* pNativeConnectionWrapper)
   at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.BcpOut(String strBcpObjectName, String strBcpObjectOwner, String strBaseBcpObjectName, Boolean fUnicodeConversion, String strDataFile, String strLoadOrderingHint, String strWhereClause, Boolean useTableLockHint, Int32 bcpFileFormatVersion)
   at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.BcpOut(String strBcpObjectName, String strBcpObjectOwner, String strBaseBcpObjectName, Boolean fUnicodeConversion, String strDataFile, String strLoadOrderingHint)
   at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.BcpOut(String strBcpObjectName, String strBcpObjectOwner, String strDataFile)
   at Microsoft.SqlServer.Replication.Snapshot.MergeContentsBcpOutWorkItem.DoWork(MergeSnapshotProvider snapshotProvider, IBcpOutProvider bcpOutProvider)
   at Microsoft.SqlServer.Replication.WorkerThread.NonExceptionBasedAgentThreadProc()
   at Microsoft.SqlServer.Replication.AgentCore.BaseAgentThread.AgentThreadProcWrapper() (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
Message: COLV_90_TO_80: Cannot convert parameter param1: Resulting colv would have too many entries.
Stack:  (Source: MSSQLServer, Error number: 20005)
Get help: http://help/20005
Message: The statement has been terminated.
Stack:  (Source: MSSQLServer, Error number: 3621)

What does this error mean? How do I get the snapshot agent to run successfully again?

Viewing all 17268 articles
Browse latest View live


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