I set up source/replica replication on Ubuntu Server 26.04 with MySQL 8.4 LTS, using the same steps I'd used for years on 8.0. Almost every step failed. Some failures were obvious syntax errors. One took a long evening to track down.
Here's the list, so you don't have to rediscover it.
The lab
| Role | Host | Address |
|---|---|---|
| Source | db01 | 10.0.0.191 |
| Replica | db02 | 10.0.0.192 |
1. The MASTER/SLAVE statements are gone, not just deprecated
In 8.0 these were deprecated but still worked. In 8.4 they're removed, and the server rejects them with a syntax error. The ones I hit, with the replacements:
| Old (8.0) | MySQL 8.4 |
|---|---|
SHOW MASTER STATUS | SHOW BINARY LOG STATUS |
RESET MASTER | RESET BINARY LOGS AND GTIDS |
SHOW MASTER LOGS | SHOW BINARY LOGS |
PURGE MASTER LOGS | PURGE BINARY LOGS |
CHANGE MASTER TO | CHANGE REPLICATION SOURCE TO |
START SLAVE / STOP SLAVE | START REPLICA / STOP REPLICA |
SHOW SLAVE STATUS | SHOW REPLICA STATUS |
RESET SLAVE | RESET REPLICA |
The options inside CHANGE REPLICATION SOURCE TO were renamed too: MASTER_HOST becomes SOURCE_HOST, MASTER_AUTO_POSITION becomes SOURCE_AUTO_POSITION, MASTER_SSL becomes SOURCE_SSL, and so on. If you have old runbooks or monitoring scripts that run SHOW SLAVE STATUS, they'll start failing with syntax errors the day you upgrade.
2. mysql_native_password is disabled by default
Old tutorials create the replication user like this:
CREATE USER 'repl'@'10.0.0.%' IDENTIFIED WITH mysql_native_password BY '...'; On 8.4 the mysql_native_password plugin is disabled by default, so that fails. You can turn it back on with mysql_native_password=ON in [mysqld], but it's deprecated and gone completely in 9.0. I didn't want to build on it, so the replication user uses the default caching_sha2_password:
CREATE USER 'repl'@'10.0.0.%' IDENTIFIED BY '...'; GRANT REPLICATION SLAVE ON *.* TO 'repl'@'10.0.0.%'; (Yes, the privilege is still called REPLICATION SLAVE.)
3. The one that cost me an evening: identical server_id
CHANGE REPLICATION SOURCE TO and START REPLICA both ran without errors on db02. But replication never started. The real error only shows up in the replica status:
SHOW REPLICA STATUS\G Replica_IO_Running was No, and Last_IO_Error said the source and replica have equal server IDs.
I'd built the replica from a backup of the source taken with xtrabackup, and I'd most likely copied the MySQL config along with it. Both servers had server-id = 1. Replication requires every node to have a unique ID, so the IO thread refuses to start.
Fix on the replica, in /etc/mysql/mysql.conf.d/mysqld.cnf:
[mysqld] server-id = 2 sudo systemctl restart mysql Don't fix it with SET GLOBAL server_id = 2 alone, since that's gone after the next restart. Then:
STOP REPLICA; START REPLICA; SHOW REPLICA STATUS\G Both lines should now say Yes:
Replica_IO_Running: Yes Replica_SQL_Running: Yes The same thing happens with cloned VMs. Check SHOW VARIABLES LIKE 'server_id'; on every node before you start.
Two more things worth knowing:
- Run writes on the source only. I once ran
CREATE USERon the replica by mistake. It doesn't flow back to the source, and if the same user is later created on the source, replication breaks on the replica when that statement arrives. Drop it on the replica and create it on the source. - If you see "Authentication requires secure connection" in
Last_IO_Error, it'scaching_sha2_passwordrefusing to send the password over an unencrypted link. AddSOURCE_SSL=1toCHANGE REPLICATION SOURCE TO(orGET_SOURCE_PUBLIC_KEY=1in a lab). I didn't hit this one, but the official 8.4 replication steps can lead you there.
4. Bonus: have_ssl returns an empty set
While checking whether the server had TLS enabled at all, I ran the query everyone's used for years:
SHOW VARIABLES LIKE 'have_ssl'; Empty set (0.00 sec). That doesn't mean TLS is off. The variable was deprecated in 8.0 and is gone in 8.4 (same for have_openssl). If a script checks have_ssl to decide whether TLS works, it will always conclude that it doesn't.
What to use instead:
-- Is TLS enabled on the server's main interface? SELECT * FROM performance_schema.tls_channel_status WHERE PROPERTY = 'Enabled'; To test an actual encrypted connection, connect over TCP. sudo mysql -u root goes through the local Unix socket, which never uses TLS, so Ssl_cipher comes back empty and makes it look like TLS is off:
mysql -h 127.0.0.1 -u someuser -p --ssl-mode=REQUIRED \ -e "SHOW SESSION STATUS LIKE 'Ssl_cipher';" If TLS works you'll see a cipher such as TLS_AES_128_GCM_SHA256. If the server can't do TLS, --ssl-mode=REQUIRED makes the connection fail instead.
The short version
- Grep your scripts and runbooks for
MASTERandSLAVEbefore upgrading to 8.4. - Don't create replication users with
mysql_native_password. - Make sure every node has a unique
server-idin the config file, especially if you cloned a VM or restored from a backup. - If
START REPLICA"works" but nothing replicates, readLast_IO_ErrorinSHOW REPLICA STATUS\G, not just the output of the command you ran. - Run writes on the source only.
- Don't check
have_ssl. Useperformance_schema.tls_channel_status, and test TLS over TCP (-h 127.0.0.1), not the local socket.
I ran into all of this while testing the labs for my book, Hands-On Ubuntu Server 26.04 LTS. The MySQL replication chapter is Chapter 6. Companion repo with errata and check scripts: https://github.com/henry-hans-author/hands-on-ubuntu-server-26.04


