Mariadb103 depreciated in 13.3 jails?

After a successful upgrade from 13.1-U6 to 13.3 yesterday and upgrading a relatively safe jail running Air Sonic, I thought I’d try one that might be a bit more problematic.

Since they were created some years ago, my jails running Nextcloud and WordPress have both been updated using pkg update && pkg upgrade, and I’ve updated versions of PHP in between. I’ve used built in update tools to update the applications, but I’ve completely neglected the databases which are both running mariadb103 :slightly_frowning_face:

In hindsight this wasn’t a great strategy, and has exposed a lack of understanding in maintaining these jails. I need to work out the best approach to updating these, so thought i’d ask some experts.

Would I be best rolling back a snapshot before I upgraded the jail from 13.1 to 13.3 and upgrading the databases from there, or can it still be done from 13.3?

What would be the best version to upgrade to and are there any idiot guides for doing this in a FreeBSD jail?

I’ve already had a failed attempt and rolled back to the 13.3 jail running 103! I removed 103 and installed 105, but then I couldn’t get the mysql-server service to run. I tried a package upgrade that updated 160+ items, but I still had no joy. I know I need to run mysql_upgrade once I’ve got it started, which might be the beginning of my problems!

Thanks in advance for any suggestions to fix this. It’s been running so well for so long I’m sure some of the FreeBSD skills I’d picked up have started to fade away :smiley:

IMHO you should upgrade your jail to 13.4 first, then install a supported MariaDB release.

Supported MariaDB releases start with 10.5:

Also available: 10.6, 10.11.

I’d try the lowest version first.

MariaDB automatically upgrades your database for the new version on start, so if your server does not start, that is in most cases due to the configuration containing removed and no longer supported statements.

Look in /var/db/mysql/…err for the reason your server does not start, remove offending statements from the config file, try again.

That’s just what system administration is. With every new version of product XY you need to check the documentation of XY and possibly adapt certain things.

And in the case of Nextcloud that involves besides Nextcloud itself at least (!) a web server, PHP, and a database.

Your task. Sorry. That’s what I do for a living.

1 Like

Thanks. I think I’m a system caretaker at best, but I’m not a very well-qualified one either! Everything I learned came from the old forum or sometimes a little further afield. I became a little complacent when I’d got everything up and running and could update things every few months without breaking it. I need to get back on top of things and also start thinking about what comes after 13.3.

1 Like

It appears there are some pretty major changes between mariadb103 and 105 and upgrading these might be beyond the scope of my system caretaking abilities cry:

I made some progress with things today, in that I was able to upgrade 103 to 105 and get the mysql-server to start, which I had been struggling with the last time. The error logs seemed to be suggesting it couldn’t restart after a crash, so I stopped the service before using pkg install and then I could get 105 to start. I’m sure this will be in Server Admin 101!

The problem I have is that after managing that step, neither my WordPress or Nextclould jails will start up as it appears they are failing to connect to the new database. I’ve checked all the configuration files, but I can see anything has changed and I can still access the databases when I SSH into the jail using mysql -user NAME -p

From what I can see from some Google searching that there were some changes to the database socket connectivity and user schema, but that’s getting into areas where my knowledge and understanding runs out.

I know it’s a long shot, but does anyone have any ideas why the upgrade from 103 to 105 is breaking both my WordPress and Nextcloud instances? I suspect if I could fix one I’d be able to fix the other (which is why I’d tried to update both!) but my Google-fu has run out for the day and I can’t see anything in various log files to show me the way.

Thanks

I believe the socket in the old versions was at /var/run/mysql.sock, and in the new versions it’s at /var/run/mysql/mysql.sock

For Nextcloud, can you check your config file at /usr/local/www/nextcloud/config/config.php to see it the database socket is correct?

1 Like

Haha! My hero!!! Thank you so much.

Now I guess I need to find a similar setting in the WordPress config files…

Just needed to add to line below into the wp-config.php file

define(‘DB_HOST’, ‘localhost:’ . DIR . ‘/var/run/mysql/mysql.sock’);

And relax. Thanks again!

For Wordpress you can simply define it as 127.0.0.1 I believe. At least in my installation it is.

1 Like

Surprise surprise, you can also specify 127.0.0.1 inside the Nextcloud config file.

This is nice.

Makes it more handy for future upgrades.

It’s odd that on FreeBSD systems you can’t specify “localhost” but “127.0.0.1” is the same thing anyway.

1 Like

Yes, I’d jumped too soon with my edit, as that didn’t work! Changing ‘localhost:’ to ‘127.0.0.1’ does, so another big thank you! If you’re ever in Edinburgh, I owe you a few drams :tumbler_glass: