Problem with Example installation on Ubuntu 20.04 LTS

At Example installation on Ubuntu 20.04 LTS — Nextcloud latest Administration Manual latest documentation
The instructions state to
apt install mariadb-server
but then a few lines later start mysqld instead with
sudo /etc/init.d/mysql start

Hello @Henry_Cobb ,

welcome to the community of Nextcloud.

You are referring to an really outdated and EOL version of Nextcloud.

Please check Table of contents — Nextcloud latest Administration Manual latest documentation.

And I get right to the page with the error by following the index on the page you show above.

I cannot see an error here. Had a look at MariaDB › Wiki › ubuntuusers.de

Which command is wrong?

The problem is that there are two correct commands, but they don’t match.
If mariadb-server is installed then the init command is /etc/init.d/mariadb instead of /etc/init.d/mysql

No, at least the first one is not, unless you still use SysVinit as an init system on your Ubuntu :wink:

Also, your link is to an old version of the instructions based on Ubuntu 20.04, but the command was already wrong then, because Ubuntu introduced systemd in 15.04, so the correct command would be systemctl start mariadb.service.

However, usually it isn’t necessary to start the service manually, since Ubuntu automatically enables and starts services when they are installed via apt, which is why the current version of the instructions no longer mentions a start comand at all: Example installation on Ubuntu 22.04 LTS — Nextcloud latest Administration Manual latest documentation

Oh, and whether you use the mysql command or the mariadb command to work with the database doesn’t really matter, as both can be used interchangeably, i.e. mysql is a symlink to the mariadb command, as far as I know.

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.