Upgrading mysql 5.7 to 8.0

Discussion in 'Installation/Configuration' started by CaptainBalou, May 10, 2022.

  1. CaptainBalou

    CaptainBalou Member

    Hello all,

    my question is regarding upgrading my mysql 5.7 to mysql 8.0 on Ubuntu. It is clear for me how an mysql upgrade works according to the documentation, but it seems that the replication of my ISPConfig primary and mirror server setup blocks me somehow. I believe it is because according to the documentation I have to upgrade the master first and then upgrade the replica host - but I think both are the master in some way.

    Right? Or not? I don't know. :) Does anyone have a few tipps on how to acomplish that? Is there a way to disable the replication for a while and re-establish it afterwards? Or am I completely wrong and this is not needed at all?

    Thanks in advance for any answer.

    All the best
    Marco
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    are you actually replicating mysql servers at all?

    if you are just running eg master server (ispconfig interface) web1, web2 (mirror of web1), db1, db2 (mirror of db1)
    that doesn't mean web2 is replicating from web1, or db2 is replicating from db1.. just that they are running the same services, and the same client configs. each local mysql server connects to the master mysql and retrieves the config data relevant for itself, and then adjusts it's own config and client config accordingly. eg creates new website or db.

    the actual client data itself is down to you to replicate in the best manner for your hardware, whether that's shared storage connected to the mirrored servers, or file/folder replication between servers (unison, rsync, dsync etc) or master-master / master-slave replication for client databases.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be that he is using MySQL master/master replication. Is this an ISPConfig Multiserver system (master/slave) or is it an ISPConfig mirror system with master/master MySQL replication?
     
  4. CaptainBalou

    CaptainBalou Member

    Hello both of you,

    thanks for your reply. I set it up via a perfect setup guide years ago - I now know I should have noted down which one it was exactly but I didn't. I think it is what @till is mentioning. I have two servers where server 2 is marked as a mirror of server1 and I have the configuration panel on both servers available. All data between the two is kept in sync via unison. On both servers I made a configuration for master and slave at the same time. So server1 is master and server2 is slave but on another database of ISPConfig it is vice versa. Does that answer you questions?
     
  5. CaptainBalou

    CaptainBalou Member

    Hello again,

    I see just one option which would be to disable/unconfigure master/master replication and re-establish it afterwards. I'm unsure how to do that but might be in using the perfect howto in reverse order. ;)

    Regards
    Marco
     
  6. Turbanator

    Turbanator Member HowtoForge Supporter

    Marco, when you say it's blocking/preventing you from upgrading to 8.0, are you saying the upgrade from 5.7 to 8.0 fails, OR is the upgrade successful, but your replication isn't working? Anything in logs?
     
  7. CaptainBalou

    CaptainBalou Member

    Hello @Turbanator. The upgrade fails because it says I have to first update the other one because it's needed to update the master or replica first. Don't know which one. But nevertheless I've always both on one server so I feel like in a dead end.
     
  8. Turbanator

    Turbanator Member HowtoForge Supporter

    Is it an option for you to turn off replication, perform the upgrades separately, do whatever 8.0 changes are needed (like the 8.0 security/password changes), then start replication again?
     
    CaptainBalou and Th0m like this.
  9. CaptainBalou

    CaptainBalou Member

    Yes, that would be a good way. Is there an easy way to switch that replication off? After the upgrade it would be good to switch it on while having an (automated or manual) verification that it is "in sync" again. Is there some pre-existing switch to toggle?
     
  10. Turbanator

    Turbanator Member HowtoForge Supporter

    I believe it's easy, but the smarter people on the thread can answer that. Just make sure you know for sure your mysql 8 and php are working fully on both installs before turning it on again. I didn't have any replication, but the upgrade caused issues a couple times for me (mainly due to mysql 8 security and php issues), and downgrading was a pain, yet my only option due to weekend timing. Make sure to backup your full data before starting...a dump AND a full copy.
     
    CaptainBalou likes this.
  11. CaptainBalou

    CaptainBalou Member

    Thanks @Turbanator for your warning regarding the upgrade. Yes, I do a backup before it and see how that works. Sorry to hear that you had big trouble during the upgrade. I hope I'll have more luck.

    And to all who know more regarding the replication I would love to get some hints regarding de- and re-activating the replication. Thanks in advance.
     

Share This Page