0

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

  1. Took a VM snapshot and mysqldump as well.
  2. systemctl stop mysqld
  3. removed mysql 5.7.26 rpms
  4. yum install mysql-community-common-5.7.33-1.el7.x86_64
  5. yum install mysql-community-libs-5.7.33-1.el7.x86_64
  6. yum install mysql-community-libs-compat-5.7.33-1.el7.x86_64
  7. yum install mysql-community-client-5.7.33-1.el7.x86_64
  8. yum install mysql-community-server-5.7.33-1.el7.x86_64
  9. 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.

Thanks

5
  • Dont know why this issue. Removing 5.7.26 rpms actually renames the /etc/my.cnf to /etc/my.cnf.rpmsave. Installing 5.7.33 rpms creates a plain new /etc/my.cnf . So when i start mysqld, it creates a new datadir in /var/lib/mysql. After removing old rpms, i renamed /etc/my.cnf.rpmsave to /etc/my.cnf and started mysqld and ran mysql_upgrade. All good now. I upgraded to mysql 5.7.33 in many servers, did not face the issue anywhere. only difference i see is my.cnf is owned by mysql in working servers while it is owned by root in current scenario. Jun 9, 2021 at 6:03
  • Copy your Comment into an Answer. (It will give you some more reputation points.)
    – Rick James
    Jun 9, 2021 at 22:54
  • Check the changelogs between 5.7.26 and .33; they may point out an issue with "in-place".
    – Rick James
    Jun 9, 2021 at 22:54
  • Hi Rick What do u mean by changelogs. does mysql upgrade summary captured anywhere? This is 5.7.33 so mysql_upgrade is not run by mysql server itself while starting mysqld ( I had to explicitly run mysql_upgrade utility in this case). So i dont see any message related to upgrade in error log. Jun 11, 2021 at 16:18
  • The 7 links (.27 to .33) are here: dev.mysql.com/doc/relnotes/mysql/5.7/en (Reading all will be tedious and boring.)
    – Rick James
    Jun 11, 2021 at 23:35

1 Answer 1

0

Dont know why this issue. Removing 5.7.26 rpms actually renames the /etc/my.cnf to /etc/my.cnf.rpmsave. Installing 5.7.33 rpms creates a plain new /etc/my.cnf . So when i start mysqld, it creates a new datadir in /var/lib/mysql. After removing old rpms, i renamed /etc/my.cnf.rpmsave to /etc/my.cnf and started mysqld and ran mysql_upgrade. All good now. I upgraded to mysql 5.7.33 in many servers, did not face the issue anywhere. only difference i see is my.cnf is owned by mysql in working servers while it is owned by root in current scenario

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.