0

I am working with EC2 for MySQL DB. The OS of EC2 is AWS Linux-based Ubuntu. The current version of MySQL is 5.6.50. I am going to upgrade it to 8.0. I tried to upgrade it with this command: sudo yum install mysql-community-server, but it shows me these kinds of errors.

Error: Package: mysql-community-client-plugins-8.0.36-1.el7.x86_64 (mysql80-community)
           Requires: libsasl2.so.3()(64bit)
Error: Package: mysql-community-server-8.0.36-1.el7.x86_64 (mysql80-community)
           Requires: systemd
 You could try using --skip-broken to work around the problem

How can I solve this problem? enter image description here

My current OS version details is here: enter image description here

6
  • This is not Ubuntu, this is AWS Linux (which is rpm based)! Commented Mar 9 at 17:39
  • Check this answer: stackoverflow.com/a/49437210/2908599 Commented Mar 9 at 17:47
  • 1
    I don't support AWS but a missing libgsasl and systemd are your first problems. You need to install/resolve those issues first. BUT... Why might you not have systemd? that I can't say - sorry Commented Mar 11 at 20:39
  • 1
    @Cardoso Please review this URL more than once. modlogix.com/blog/how-to-upgrade-mysql-5-6-to-8-version Then consider contacting ModLogix by Langate to see if they would provide services. Welcome to SF. Commented Mar 14 at 23:39
  • 1
    @WilsonHauck Thank you for letting me know the way. I just asked this question on the Modlogix chatbot and he said one engineer would contact me later. I am waiting for him. Thank you.
    – Cardoso
    Commented Mar 15 at 0:11

3 Answers 3

1
+25

It could be that you are running Amazon Linux 1.0, that version doesn't support systemd. So I think you might need to upgrade the os first before you can upgrade myswl

2
  • Guido! Thank you for your answer. I updated my question by including my AWS EC2 OS details. Please reference it and let me know if it doesn't support systemd.
    – Cardoso
    Commented Mar 13 at 21:45
  • Yes Amazon Linux Ami is Amazon Linux 1
    – Guido
    Commented Mar 16 at 20:52
0

Upgrading from MySQL 5.6x to 8.x is not supported... You'll need to upgrade MySQL to 5.7.9 first, then from that version you should be able to upgrade to 8.x

https://dev.mysql.com/doc/refman/8.0/en/upgrade-paths.html

2
  • thank you for your answer. It is reasonable. My current MySQL version is 5.6.50. Can you share the way to upgrade it to 5.7.9, please?
    – Cardoso
    Commented Mar 13 at 21:39
  • Hi. You can download historic versions of MySQL from downloads.mysql.com/archives/installer. (Download the most recent 5.7.x version available) Once you have the RPM file on your server, you can have yum install the package for you: yum install mysql−community−server−* then do a reboot. At that time you should be able to upgrade it to version 8.x
    – Dre
    Commented Mar 20 at 19:06
0

Oh deer!?! You don't want to upgrade your database infrastructure this way. GOODNESS!

So many people have had an issue doing this. It almost always turns out icky. I cannot possibly urge you enough. Take a step back and do this, properly. You'll be a hero for doing it so smoothly! Bask in the glow of the blinky lights...

  1. take a dump dump your mysql database to a file. You might want to do this off-peak, as locking tables while the dump takes place may cause an issue with users?

  2. put your fresh DB dump someplace safe, in AWS (preferably in-region)

  3. spin up your fresh VM an install MySQL v8 as you normally would. make sure you gather configuration changes from your older instance.

  4. move your DB dump from earlier onto your new machine and import While it is possible to do this live, it is NOT good practice to do so. Take a dump!!!

  5. have everyone point applications at the new database server that you just expertly created and migrated. Once everything is using your new v8 MySQL DB, stop the old DB VM. Just stop it. I would advise you to create an AMI of it, just in case something was forgotten. You could take a full backup of the VM, or attach the disk to another instance. Don't just willy-nilly delete it. Not yet. You might need to get something off there ... Be the Hero! If your organization doesn't really care about cost control, then leave the stopped instance there until some planned and agreed time to terminate and delete the attached disks.

Of course, you could be super MySQL smart, and setup replication between your older DB server and a fresh, new, v8 DB server. Then once the nodes are in sync, break the replication & promote your new DB server to master. Might be a bit more work, however.

It's pretty risky doing an in-place upgrade with apt like that. If it doesn't work the first time, will there be customer impact? Will the business continue to do business without it? Would your boss hit the ceiling if you F-up the database and can't get it back online again? If you answer 'yes' to any of those questions, you REALLY should be looking at doing this better. Smarter! This could go so very badly and it really doesn't have to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .