MySQL Forums
Forum List  »  Newbie

Databases are not showing up on Replicated Server
Posted by: Lib Tech
Date: July 24, 2024 06:01PM

Hi Community,
As a newcomer to this community, I'm reaching out for your invaluable expertise. I'm currently working with a MySQL server and attempting to set up a secondary server for data redundancy in case of system failure. The primary server is functioning as expected, and I've installed the mysql-server package on the new server. I've made the necessary edits to the/etc/my.cnf.d/mysql-server.cnf file on both servers, with the master server ID set to 1 and IP to 212, and the slave server ID set to 2 and IP to 112.
bind-address = 192.168.1.212
server-id = 1
log_bin = mysql-bin

Restarted mysqld service.
Then I created user "replica" and granted permission GRANT REPLICATION SLAVE ON *.* TO 'replica'@'192.168.1.112';

I stopped the slave, entered the information below, and started.
CHANGE MASTER TO
MASTER_HOST='192.168.1.212',
MASTER_USER='replica',
MASTER_PASSWORD='Pass1234',
MASTER_LOG_FILE='mysql-bin.000001',
MASTER_LOG_POS=157;

When I ran the command "SHOW DATABASES; I didn't save the master server's databases. When I Ran the command "SHOW SLAVE STATUS\G I saw the below error. How Can I fix this error? It's also not the correct approach. The goal is if the master database is down, I can point traffic to the slave.

Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction 'ANONYMOUS' at source log mysql-bin.000001, end_log_pos 483. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

I Appreciate your help!

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.