I am doing an in-place upgrade from mysql 5.7.26 to 5.7.33. I have done from 5.6 to 5.7 for serveral hosts and did not face this issue.
Followed below steps
- Took a VM snapshot and mysqldump as well.
- systemctl stop mysqld
- removed mysql 5.7.26 rpms
- yum install mysql-community-common-5.7.33-1.el7.x86_64
- yum install mysql-community-libs-5.7.33-1.el7.x86_64
- yum install mysql-community-libs-compat-5.7.33-1.el7.x86_64
- yum install mysql-community-client-5.7.33-1.el7.x86_64
- yum install mysql-community-server-5.7.33-1.el7.x86_64
- systemctl start mysqld
After installed 5.7.33 rpms, when i tried to run mysql_upgrade ,I realized my password is'nt working and then when i checked i saw a new empty /etc/my.cnf file and new instance under /var/lib/mysql. I could still see my actual data directory intact.
Why is this issue because i never faced it before. If i replace the empty my.cnf with my actual my.cnf and restart the mysqld service, will it be a solution to my problem.