46 votes

MySQL relay log corrupted, how do I fix it? Tried but failed

Error: Last_SQL_Errno: 1594 Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. This error message means that the copy of the MySQL replication log could not be read on ...
user avatar
  • 561
30 votes
Accepted

Postgresql doesn't accept replication connection

The database name has to be replication as all does not cover replication connections. host replication postgres 127.0.0.1/0 trust The PostgreSQL documentation ...
user avatar
23 votes
Accepted

How to backup large MongoDB database

With the need of 10TB to be backed up this gets a bit complicated. Replicas are no replacement for proper backups While delayed replica set members can provide an relatively easy way to help you ...
user avatar
22 votes
Accepted

Replication Monitor Information using T-SQL

After doing some online search,I found what you needed,hope my answer helps you. Answer 1 Note: It Only works with transactional and transactional peer to peer replication T-SQL script which ...
user avatar
  • 1,447
21 votes
Accepted

How do I query the running pg_hba configuration?

Version 10 and above There is a very convenient view for this called pg_hba_file_rules. table pg_hba_file_rules ; line_number │ type │ database │ user_name │ address │ ...
user avatar
  • 28.9k
16 votes
Accepted

MySQL Replication: Seconds Behind Master super high

When you see the Seconds_Behind_Master that high, I look at the following: Relay_Log_Space: 8179978166 You have 7.6182GB of relay logs to process. Master_Log_File: mysql-bin.000173 ...
user avatar
16 votes

Using Postgresql logical replication, how do you know that the subscriber is caught up?

I used replication on Postgres 10 last year and I had the same problem understanding how to monitor the process, as documentation is not clear enough. Anyway, I'll try to give you an example to check ...
user avatar
  • 476
15 votes

MySql - Changing expire_logs_days without restarting the server

In MySQL 5.6, you would want to show what your expire_logs_days is set to first. Then confirm that the master doesnt need to keep these logs more than x amount of days. Word of caution, having binary ...
user avatar
14 votes

Mongo DB Replica set Stuck at RECOVERING state

The easy, albeit a bit unsecure way Stop the first secondary Delete the content of it's dbpath Restart the secondary Wait for it to catch up with the primary Repeat process with the second secondary ...
user avatar
14 votes
Accepted

Database: One table or many

You should definitely (in my opinion) not have 142 tables - it'll be a complete mess to name, index and maintain, and you'll generate yourself a lot of extra work if you some day add another category, ...
user avatar
14 votes

Mongo ReplicaSet - arbiter in connection string

Connecting to a replica set Most drivers will show the following behavior, as far as I know If only a single node is given, the driver will simply connect to this node. If the replicaSet option is ...
user avatar
13 votes
Accepted

How to change a MySQL previous slave to be a master and remove slave status information?

In MySQL 5.5.16 and later, you can use RESET SLAVE ALL to do all that RESET SLAVE does and reset the connection parameters from the memory, this way it doesn't require a mysqld restart.
user avatar
13 votes

Is it safe to delete mysql-bin files?

Try this: RESET MASTER; as the document said: RESET MASTER enables you to delete any binary log files and their related binary log index file, returning the master to its state before binary ...
user avatar
  • 241
13 votes

MySQL relay log corrupted, how do I fix it? Tried but failed

[Fixing MySQL replication after slaves' relay log was corrupted] MySQL replication on slave (version 5.XX) has stopped. Slave_IO_Running was marked as Yes, but Slave_SQL_Running as No. Simple stop/...
user avatar
12 votes

Mysql replication is enabled but stuck at "waiting for binlog to be updated"

MySQL Replication is running just fine. How do I know ? Slave_IO_Running: Yes Slave_SQL_Running: Yes This indicates that the two replication threads are alive. To verify this, run the following on ...
user avatar
12 votes
Accepted

How to fix a messed up replication on MS SQL Server

TLDR: It appears that disabling and re-enabling replication probably fixed the issue: exec sp_replicationdboption @dbname = N'DatabaseName', @optname = N'publish', @value = N'false' exec ...
user avatar
  • 371
12 votes
Accepted

What is a "hashed transaction" in SQL Server Replication terminology?

In reality, this DMV (Dynamic Management View) won't be very helpful for a DBA or Developer and is geared to SQL server Product Support and Product Group. You can ignore this DMV. Hash tables work ...
user avatar
11 votes

Add article to transactional publication without generating new snapshot

Add new articles in your Publication property window (uncheck the Show only checked articles in the list) right click the same Publication node and go to "View Snapshot Agent Status" click start and ...
user avatar
  • 505
11 votes

Move live SQL Server database to a new server

since you are using SQL Server 2008 Web edition, your best bet is to use LOG SHIPPING. Your database size is 100GB, so initializing the secondary from a backup should be considered. Dont use GUI to ...
user avatar
  • 61.2k
11 votes
Accepted

Show sql statements from mysql binlog (GTID)

It seems that the option --verbose must be added: mysqlbinlog --base64-output=AUTO --verbose mysql-bin.000005 In the result you see: ### UPDATE `customer` ### WHERE ### @1=388442 ### @2=...
user avatar
  • 378
11 votes

Error 1236 - "Could not find first log file name in binary log index file"

If all else fails, you may find that you need to reset the slave and restart replication. From https://www.redips.net/mysql/replication-slave-relay-log-corrupted/ : # First note current settings (note ...
user avatar
11 votes
Accepted

Postgresql: invalid record length at 29/E4624520 but replication looks fine

I cannot do anything else than quoting an entry from the pgsql-admin mailing list: Just after startup, the standby tries to read and replay the WAL files which exist in the standby, and then if ...
user avatar
  • 28.9k
10 votes

Some MySQL slave errors?

It's better not to skip by hundreds. Just loop one-by-one: until mysql -e "show slave status\G;" | grep -i "Slave_SQL_Running: Yes";do mysql -e "stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; ...
user avatar
  • 201
10 votes

mysql replication on windows server

Replication setup on a windows server is equivalent to doing it in other systems: The official manual provides you a detailed guide. In short: Configure on both servers a different server-id, and ...
user avatar
  • 14k
10 votes

Replication Lag on Postgres AWS RDS Service

I had the same issue with our staging RDS. After quite a while I found a blog post that says: In a very busy database, with many writes per second, this number will remain fairly accurate. However, ...
user avatar
10 votes
Accepted

InnoDB: Error: Table “mysql”.“innodb_table_stats” not found

The problem is actually very simple. Here is what happened When you installed MySQL, the 5 InnoDB systems tables exist in two places inside /var/lib/mysql/mysql as 5 .frm and 5 .ibd files inside the ...
user avatar
10 votes
Accepted

How do I configure AWS Aurora to separate write/read operations

AFAIK, you're right that AWS RDS Aurora (a MySQL 5.6 fork) does not support automatic or transparent read/write splitting: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Aurora.html In ...
user avatar
  • 1,231
10 votes
Accepted

ssms - how to format T-SQL scripts?

SSMS doesn't have any built-in formatting functions, but there are several 3rd party tools and web sites that can help, many of them free, and all of them surely better than using Word: http://www....
user avatar
10 votes
Accepted

Can the account name of 'distributor_admin' be changed?

No it can't be renamed. The good news is that the account only exists on the distributor, which doesn't really contain any user data. You can safely disable the account when you aren't setting up ...
user avatar
  • 26.9k
10 votes
Accepted

Postgresql 10 create subscription hangs

From the docs: Creating a subscription that connects to the same database cluster (for example, to replicate between databases in the same cluster or to replicate within the same database) will ...
user avatar
  • 32.1k

Only top scored, non community-wiki answers of a minimum length are eligible