Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql: upgrade to v8 for nextcloud v21 #1626

Closed
kyrofa opened this issue Feb 1, 2021 · 57 comments
Closed

mysql: upgrade to v8 for nextcloud v21 #1626

kyrofa opened this issue Feb 1, 2021 · 57 comments

Comments

@kyrofa
Copy link
Member

kyrofa commented Feb 1, 2021

A warning on 20.0.6 states:

MySQL version "5.7.33" is used. Nextcloud 21 will no longer support this version and requires MySQL 8 or higher.

We'll need to do that. This will be done in a manner that is completely transparent to users, so if you're coming across the issue as a user, don't worry-- you can safely ignore that message.

@drasbeck
Copy link

drasbeck commented Feb 5, 2021

I get the same message with 20.0.7snap1

@kyrofa
Copy link
Member Author

kyrofa commented Feb 5, 2021

Yeah don't worry, it's not an error, it's a heads up. I promise we won't update you to v21 without it 😃 .

@GambaJo
Copy link

GambaJo commented Feb 6, 2021

Yeah don't worry, it's not an error, it's a heads up. I promise we won't update you to v21 without it 😃 .

Great. I already startet to investigate how to do it. Now I will wait and drink tea ;)

@faarruuk
Copy link

faarruuk commented Feb 7, 2021

hi, just a short question.. is there a way to remove this warning? because it makes my customer feeling insecure ;) and I don't have actually the time to run a DB upgrade..

@kyrofa
Copy link
Member Author

kyrofa commented Feb 7, 2021

Not that I know of, this is embedded in upstream Nextcloud. They've pulled stuff like this before where they sent a notification saying "there's a security vuln in nginx, please upgrade immediately!" and of course... the snap doesn't even use nginx. I'd like to hide this type of thing for y'all, too.

@szaimen
Copy link
Contributor

szaimen commented Feb 7, 2021

@faarruuk you might be able to hide those warnings with the custom_css app if it is really important to you.

@kyrofa kyrofa pinned this issue Feb 10, 2021
@kyrofa kyrofa changed the title mysql: upgrade to v8 mysql: upgrade to v8 for Nextcloud v21 Feb 10, 2021
@kyrofa kyrofa changed the title mysql: upgrade to v8 for Nextcloud v21 mysql: upgrade to v8 for nextcloud v21 Feb 10, 2021
@edvaldsula
Copy link

Hi,

Basically, we do not have to do anything from our side? The upgrade of MySQL will be done automatically from the Nextcloud when it will be updated to Nextcloud 21. So, when it is planned to be done?

@kyrofa
Copy link
Member Author

kyrofa commented Feb 17, 2021

Basically, we do not have to do anything from our side?

That's correct.

So, when it is planned to be done?

When I'm able. Sooner if someone else wants to take a crack at it.

@selfroasted
Copy link

I couldn't have thought of a better result in my DDG search for this issue. After getting this same error, I landed here, read that it was going to be taken care of without the need for me to really do anything except continue my backups, and am going to continue my evening. However, I am lifting my drink to cheers you fine folks behind this work. Thank you.

@caseydiers
Copy link

Observed here as well. Look forward to an update to resolve this. Wish I was qualified to help take care of it! Thanks @kyrofa and whomever else is involved. We appreciate you!

@Lotze83
Copy link

Lotze83 commented Mar 8, 2021

Thanks for the snap! i wait next update to up nextcloud to 21 :)

@vawaver
Copy link

vawaver commented Mar 8, 2021

Guys, have some rumours about the release date of SNAP 21?

@ftpmorph
Copy link

Hey, first off great news this will be sorted "automagically" as it were.

I updated MySQL on my VPS as soon as I saw the error just because it's a new install I figure it's best to have everything up to date now, rather than later when I have to worry about losing data.

The problem I'm having is I upgraded to MySQL 8.0.23 successfully in Ubuntu:

apt policy mysql-server
mysql-server:
Installed: 8.0.23-1ubuntu20.04

...and yet this has no effect on Nextcloud, which still gives me that error.

I take it this is because the actual version of MySQL being used is inside the snap, so the version I have installed on Ubuntu itself makes no difference here?

Does this mean I can uninstall MySQL from Ubuntu safely without breaking anything in Nextcloud? Because if it's not being used it's just wasting resources.

Cheers.

@kevinschachtschneider
Copy link

@ftpmorph

Does this mean I can uninstall MySQL from Ubuntu safely without breaking anything in Nextcloud

This is correct, if nothing else on your system uses the MySQL you installed via apt then it is safe to remove because, as you mentioned, the snap uses a bundled version of MySQL that only Nextcloud Snap uses.

@rorybellows
Copy link

Can I just verify then...if I installed Nextcloud via snap then it will automatically update to v21 and MySQL 8 right?

@kyrofa
Copy link
Member Author

kyrofa commented Mar 16, 2021

That's correct @rorybellows.

@tawissus
Copy link

Is there a schedule yet or could the upgrade still take some time? In the meantime there will surely be the next updates of version 20 or?

@SireAngelus
Copy link

SireAngelus commented Mar 29, 2021

Hi! do we have an ETA? it's almost April. Otherwise i might be willing to have a crack at it but i'm a total noob on how to create snap packages so i'll need some basic guidance.

@JMoVS
Copy link

JMoVS commented Apr 13, 2021

@kyrofa Really love and appreciate your work! So far it's been super smooth sailing with the snap (aside from some weird cashing things because of snap) - is this upgrade here proving to be more difficult? I'm eagerly awaiting Nextcloud 21 for its Whiteboard feature ;-)

@RayCulp
Copy link

RayCulp commented Apr 22, 2021

Our hosting provider will not be providing support for MySQL 8 any time soon. Do I understand correctly that the best alternatives are to use the self-contained snap or switch to MariaDB or PostgreSQL?

@kyrofa
Copy link
Member Author

kyrofa commented Apr 22, 2021

Not if you're using the snap. It doesn't matter what your provider supports, at that point.

@kyrofa
Copy link
Member Author

kyrofa commented Apr 22, 2021

No ETA yet, by the way. I've started, but I need to finish repairing fence on the ranch so I can get the cows on my pasture, so we still have a little ways to go on this one.

@RayCulp
Copy link

RayCulp commented Apr 22, 2021

Not if you're using the snap. It doesn't matter what your provider supports, at that point.

I'm not currently using the snap and I'm not sure my hosting provider / solution supports snaps. It's a shared hosting solution.

@kyrofa
Copy link
Member Author

kyrofa commented Apr 22, 2021

Ah, I see your edit. Yes, I agree with your assessment.

@RayCulp
Copy link

RayCulp commented Apr 22, 2021

Ah, I see your edit. Yes, I agree with your assessment.

Thanks!

@RayCulp
Copy link

RayCulp commented Apr 23, 2021

I'm afraid my hosting provider got back to me with very bad news. They do not support MariaDB, PostgreSQL or Snaps, and they will not in the foreseeable future. The only alternative they can offer is to let me try a Linux VPS for free for a month to see if I can move my existing installation with all files and data that it already contains and try to get it up and running on that.

Now, I have an MCSA certification but almost no experience with Linux servers. In my experience, you cannot simply set up a server and allow access to it from the Internet. You absolutely must harden it, or you are inviting disaster. Let's say I manage to move my existing Nextcloud to a VPS and get it running. I would not know where to start to harden Linux, and I feel extremely apprehensive about renting a VPS, installing Nextcloud and opening the doors wide for anyone on the Internet to try to hack it.

What other options exist? Can anyone recommend hosting providers with inexpensive shared hosting solutions that fulfill the system requirements for NC 21?

kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 28, 2021
Resolve nextcloud-snap#1626

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 28, 2021
Resolve nextcloud-snap#1626

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@runil
Copy link

runil commented Apr 28, 2021

I stupidly upgraded to master build a while back and luckily the core features have been working for several months.

I'm running into issues with some applications (eg. when trying to install the Mail-app, i get the error "There is no table with name 'nextcloud.oc_mail_messages' in the schema." ). I can see that even though I'm running Nextcloud 22, the server still reports that the MySQL-database is of version 5.

Will the migration solution that's in the working allow users of the master-build to upgrade their MySQL-version?

@Fuseteam
Copy link

reminder that this repository is for the snap variant of nextcloud

@kyrofa
Copy link
Member Author

kyrofa commented Apr 28, 2021

Alright folks, we have #1710 up that could use some testing if anyone is up for it.

@kyrofa
Copy link
Member Author

kyrofa commented May 8, 2021

Last call for testing, I'm hoping to land this tomorrow.

@HvdK-zOS
Copy link

HvdK-zOS commented May 8, 2021

Hello Kyrofa,

on my Nextcloud server it worked.

:~$ mysql -V
mysql Ver 8.0.23-0ubuntu0.20.10.1 for Linux on x86_64 ((Ubuntu))

Nextcloud is currently on 20.0.9

And no warning any more ....

Thanks !

@kyrofa
Copy link
Member Author

kyrofa commented May 8, 2021

Okay landed, it will be contained in 20.0.9snap2. Keep an eye on #1721; once it lands folks will start automatically updating.

@kyrofa kyrofa closed this as completed in 0f53419 May 8, 2021
@kyrofa kyrofa unpinned this issue May 14, 2021
@kyrofa
Copy link
Member Author

kyrofa commented May 14, 2021

Sorry for the delay on this folks. I always test new releases on my own production instance before rolling it to you, and I thought this upgrade hung on me. Turns out I was wrong, it just took a really long time (like 5 minutes). I was used to the mysql upgrader between 5.7 releases, apparently upgrading to v8 just takes a while on a big database. My instance is massive, so that probably won't be the average case, but I wanted to give you a heads up. I'm rolling this out now. If you feel like it's taking a while, watch /var/snap/nextcloud/current/logs/mysql_errors.log and you'll see it happening (check my timestamps for an estimate):

2021-05-14T13:31:49.037582Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-14T13:31:54.867120Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-14T13:32:06.951561Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /tmp/mysqlx.sock
2021-05-14T13:33:17.206627Z 2 [System] [MY-011003] [Server] Finished populating Data Dictionary tables with data.
2021-05-14T13:33:47.130278Z 5 [System] [MY-013381] [Server] Server upgrade from '50700' to '80024' started.
2021-05-14T13:36:03.356780Z 5 [System] [MY-013381] [Server] Server upgrade from '50700' to '80024' completed.

@caseydiers
Copy link

Thanks Kyle. Refreshed the snap and everything worked perfectly. Start to finish was less than a minute on a relatively small deployment.

@rorybellows
Copy link

Thanks Kyle. Refreshed the snap and everything worked perfectly. Start to finish was less than a minute on a relatively small deployment.

Can you explain how you refreshed the snap please?

@caseydiers
Copy link

sudo snap refresh

@kyrofa
Copy link
Member Author

kyrofa commented May 14, 2021

Can you explain how you refreshed the snap please?

Note that you don't have to do anything unless you want to upgrade right now (in which case @caseydiers is spot on). It'll upgrade on its own within a few hours unless you've tweaked the update settings for snaps.

@tawissus
Copy link

Version: 7.4.18
Version: 8.0.24
20.0.9snap2 ✓

Thank you for all the work! So far everything is working fine.

@DeirdreYoung
Copy link

PHP : Version: 7.4.18
MySQL : Version: 8.0.24
Status.php says : version "20.0.9.1" - and I'm using the snap package.
Admin overview says : "All checks passed" - I'm very happy to see this.

WebDAV works fine with Windows Explorer, I'm able to see all my files (and rename, as a test)

Kyrofa, thank you for your hard work, and everyone else pitching in who I don't know.

@Fuseteam
Copy link

@DeirdreYoung how did you resolve the imagick "issue"?

@szaimen
Copy link
Contributor

szaimen commented May 16, 2021

how did you resolve the imagick "issue"?

Disable the theming app and the issue will be gone.

@DeirdreYoung
Copy link

I confirm that I do not have theming enabled and didn't hit the imagick issue.

@rorybellows
Copy link

My Nextcloud just upgraded to version 21.0.1 and then now I'm getting this message:

There are some warnings regarding your setup.

Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code ↗ of the region to your config file.

What's going on?

@d4n13Lh
Copy link

d4n13Lh commented May 20, 2021

Look up your ISO 3166-1 country code and then use
sudo nextcloud.occ config:system:set default_phone_region --value=CH (replace CH with yours)
to store it in the config.

@GambaJo
Copy link

GambaJo commented May 20, 2021

Upgrade seems to work well. Thx @kyrofa and @d4n13Lh .

@rorybellows
Copy link

Look up your ISO 3166-1 country code and then use
sudo nextcloud.occ config:system:set default_phone_region --value=CH (replace CH with yours)
to store it in the config.

Worked like a charm! Thank you!!!

@kyrofa
Copy link
Member Author

kyrofa commented May 20, 2021

I sure wish the Nextcloud developers would stop throwing random suggestions into that section that look like warnings.

@Fuseteam
Copy link

yeah agreed, its not like we all use phone numbers in the system. i don't even have my number saved into it and even if i did if i want international calls i'll just add my country code lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests