An Annoying MySQL Replication Error Code: 1045

I was fixing MySQL replication on a slave this past week. Everything seemed to be ready to go after bringing data over from the master manually. I went to connect the slave to the master and nothing happened. Whaaaaaa?

Last_IO_Errno: 1045
Last_IO_Error: error connecting to master 'repl@blah.local:3306' - retry-time: 60 retries: 86400

Let me look up MySQL error code 1045:

    Message: Access denied for user '%s'@'%s' (using password: %s)

That’s not helpful. After some additional testing I realized the password might be too long. Sure enough, the CHANGE MASTER TO syntax guide states MASTER_PASSWORD has a maximum length of 32 characters (despite the MySQL client having a longer limit).

Your subscription could not be saved. Please try again.
Your subscription has been successful.

Subscribe to DevOps'ish!

DevOps, Cloud Native, Open Source, industry news, and the ‘ish between assembled by open source professional, DevOps leader, and Cloud Native Computing Foundation (CNCF) Ambassador Chris Short.

We use Sendinblue as our marketing platform. By Clicking below to submit this form, you acknowledge that the information you provided will be transferred to Sendinblue for processing in accordance with their terms of use

It’s annoying that this limit exists and the error 1045 message isn’t clearer about it. Hopefully you found this very early on in your search for an answer.