[Solved] Percona XtraDB Cluster 8.0 root password is not working on ubuntu 20.04 LTS

Percona XtraDB Cluster 8.0 root password is not working on ubuntu 20.04 LTS

Percona XtraDB Cluster 8.0 with MySQL 8.0 is no doubt a very good combination for a seamless and highly available database platform. Installation of Percona XtraDB cluster 8.0 on Ubuntu is simple and easy. Its just a few commands away with having an internet connection and Ubuntu 20.04 LTS. You only need to follow the under listed page for pre-requisite and rest is just copying and pasting those commands. Although the first command

sudo apt-get install percona-xtradb-cluster

for cluster installation will not work for Percona XtraDB cluster 8.0 (At least it didn’t worked for me) and I used the alternate method to install it. Under given is the URL for more instructions about installation.

Percona XtraDB cluster 8.0

Official Latest packages can be downloaded from under listed URL so that dpkg commands can be used to install it on Ubuntu 20.04LTS.

Percona XtraDB Cluster 8.0 Latest Packages for Ubuntu 20.04LTS

During the installation process the user will be prompted to enter the root password of MySQL. I entered the correct password and recorded it so that I can use it once the installation is completed. Once I bootstrap the first node and tried to login using

mysql -u root -p

it started giving me authentication errors.

I tried every possible way to resolve the issue, even reinstalled the complete cluster. completely reinstalled the Ubuntu 20.04LTS and reinstalled the cluster but still got the same error that root password is not correct.

It mostly happen when you install MySQL on RedHat and CentOS that a temporary password is provided. There is nothing written anywhere that even if you will provide a password during installation on Ubuntu 20.04 LTS, you will still be provided a temporary password. On RHEL the path to find the temporary password is different and on Ubuntu 20.04 LTS the path is different.

Find the temporary Percona XtraDB Cluster 8.0 root password

cat /var/log/mysql/error.log | grep ‘temporary password’

By issuing the above command, I found the temporary password which worked like charm. I changed the password and voila. I hope this will help someone struggling like me. Thanks for reading this.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.