How to Fix MySQL Error 1760 (ER_INSECURE_CHANGE_MASTER)

Published
Length
3 min read

Luis Felipe Dias

All posts

You trigger mysql error 1760 when you pass plain text replication credentials to the database engine. To fix this warning, remove credentials from your setup statement or use encrypted client keys. Database admins often see this message when they set up a new replica node. The engine warns you that saving user names or passwords in the master info repo is unsafe. While replication still starts, leaving plain text credentials on disk creates a major security risk. What causes mysql error 1760

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You trigger mysql error 1760 when you pass plain text replication credentials to the database engine. To fix this warning, remove credentials from your setup statement or use encrypted client keys.

Database admins often see this message when they set up a new replica node. The engine warns you that saving user names or passwords in the master info repo is unsafe. While replication still starts, leaving plain text credentials on disk creates a major security risk.

What causes mysql error 1760 in database clusters

In the official error rules, mysql error 1760 maps to symbol ER_INSECURE_CHANGE_MASTER and SQLSTATE HY000. The engine triggers this warning when a setup statement includes a user name or password.

When you run a replication setup statement, the replica saves those details to its storage repo. This repo lives either in a local file on the disk or inside a system table. Anyone who can read that file or table can see the replication password in plain text.

Automation scripts and backup tools also trigger this warning during cluster recovery. If a script passes credentials inside the query string, the database logs the query and raises 1760. Attackers who read system tables or host files can steal these keys and move across the network.

How to diagnose and fix replication credential warnings

First, check your database logs and setup scripts to see how replica nodes log in. Look for any admin tasks that pass user names or passwords inside database statements. You must stop storing sensitive keys inside the master info repo.

One safe fix is to pass credentials only when you start the replication thread in memory. When you do this, the engine holds the password in memory and never writes it to disk. If the replica restarts, your automation tool must pass the secret again to restart replication.

MySQL Access Governance + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

A better fix is to use certificate login for all replica nodes in your cluster. With certificates, the replica proves its identity to the primary node without sending a password. You can then run the setup statement with no password at all, which stops the warning.

You can also store replica login details inside an encrypted client login path on the host. Make sure that only the database system account can read this encrypted file on the server. Also, turn on log redaction so plain text secrets never appear in audit logs or history tables.

How to keep replica credentials safe in production

Never grant broad admin roles to a replication user account just to fix login issues. Create a dedicated role that only has permission to read binary logs from the primary server. Restrict that account to the exact IP address of the replica host.

Rotate your replication keys on a regular schedule to limit the impact of a leaked secret. When engineers run manual checks on replica nodes, make sure they do not share admin passwords. Data masking can also rewrite matched fields like emails, phone numbers, card numbers, and national IDs in query results.

Good access controls prevent team members from reading raw system tables that store replica settings. By combining least privilege roles with certificate logins, you eliminate warning 1760 and protect your cluster.

Check MySQL queries and results on the wire

MySQL grants control who logs in. They do not check single queries or mask sensitive columns once a session starts. With hoop.dev, you run an open-source proxy, a sidecar for your MySQL, inline in the MySQL wire protocol. On every query an AI agent or human runs against production MySQL, RDS, or Aurora, hoop.dev decides to pass, mask, block, or hold it for review.

Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails, which refuse banned queries with a native MySQL error or hold risky ones for approval. On the response path, hoop.dev data masking rewrites string values in returned rows in memory, and every decision is logged. See the MIT-licensed project on GitHub.

Frequently asked questions

Does mysql error 1760 stop replication from starting?

No, code 1760 is a security warning rather than a hard failure that stops the engine. The database still applies your settings, but it warns you that plain text storage is unsafe.

Where does the database store the master info repository?

Depending on your server settings, the engine stores this data in a file or system table. Both locations keep the replication user name and password in plain text unless you change your setup.

How do I clear plain text passwords already saved on a replica?

You must reset the replica settings and run the setup again without passing a password string. After you switch to certificate logins, change the old password on the primary server right away.

The query runs. The emails stay hidden.