MySQL Error ‘Unknown or incorrect time zone’ at a replica

Have you ever tried to do a MySQL replication at a different timezone/SO and got the following error message at SHOW REPLICA STATUS? Well, there are two ways to solve this, Error ‘Unknown or incorrect time zone: ‘America/Cuiaba” on query. Default database: ‘glpi_tiab’. Query: ‘BEGIN’

If you are on Linux, you can run the following and solve the problem (after a restart of the service).

$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p

On Windows, I found it to be easier if you download the timezone instead of build/import your own. You can download from here https://dev.mysql.com/downloads/timezones.html.

use mysql;
source /path/to/file/timezone_posix.sql;

Well, that’s it for today. See ya.

Oracle Streams: Adding a Table to Streams Replication

Feel old yet?
Don’t worry, we all know that there are still companies using Streams. So, here goes a quick manual for a regular activity: Add a new table to replication using SYS.DBMS_STREAMS_ADM.

For this, assume the following:

STREAMS SETUP OWNER => streams_adm
CAPTURE PROCESS => str_capture
APPLY_PROCESS => str_apply
SOURCE DATABASE TABLE OWNER => TBLOWNER
TARGET DATABASE TABLE OWNER => TBLOWNER_DEST

The high level steps to add table to streams are as follows:

1. Stop streams CAPTURE
2. Create the table on the target database
3. Configure the CAPTURE process
4. Add a rule to the APPLY process
5. Instantiate the new object
6. Create constraints and indexes
7. Restart streams CAPTURE and APPLY

Let’s detail them:

More“Oracle Streams: Adding a Table to Streams Replication”