Mysql is not supported (cli install)

Hi All I am getting this

In Install.php line 125:

Database < mysql> is not supported.

maintenance:install [–database DATABASE] [–database-name DATABASE-NAME] [–database-host DATABASE-HOST] [–database-port DATABASE-PORT] [–database-user DATABASE-USER] [–database-pass [DATABASE-PASS]] [–database-table-prefix [DATABASE-TABLE-PREFIX]] [–database-table-space [DATABASE-TABLE-SPACE]] [–admin-user ADMIN-USER] [–admin-pass ADMIN-PASS] [–admin-email [ADMIN-EMAIL]] [–data-dir DATA-DIR]

I am using the CLI install method as I want to connect a bucket as object based storage.

Im using php 7.2 with all of the recomended modules
MariaDb Latest version and ubuntu server 18.04

Any ideas?

Have you double checked that the mysql database module has correctly been loaded for the PHP cli and web component before you tried to install the software?

sorry about the delay. So i created a php file to display the currently loaded php extensions which outputted the following.

Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => zlib [6] => filter [7] => hash [8] => Reflection [9] => SPL [10] => sodium [11] => session [12] => standard [13] => apache2handler [14] => mysqlnd [15] => PDO [16] => xml [17] => calendar [18] => ctype [19] => curl [20] => dom [21] => mbstring [22] => fileinfo [23] => ftp [24] => gd [25] => gettext [26] => iconv [27] => json [28] => exif [29] => mysqli [30] => pdo_mysql [31] => Phar [32] => posix [33] => readline [34] => shmop [35] => SimpleXML [36] => sockets [37] => sysvmsg [38] => sysvsem [39] => sysvshm [40] => tokenizer [41] => wddx [42] => xmlreader [43] => xmlwriter [44] => xsl [45] => zip [46] => Zend OPcache )

As far as i was concerned all of the modules are loaded

I have this same problem using PHP7.4, but it doesn’t matter which SQL standard I use. They all produce a similar error.

Ubuntu Server 20.04

Did you use the command like in the example in the documentation (with quotes):
https://docs.nextcloud.com/server/19/admin_manual/installation/command_line_installation.html

Please give more details on how to reproduce the error.

I just encountered substantially the same issue when attempting to install Nextcloud on Ubuntu Server 20.04.4.

From /var/www/nextcloud, I executed

sudo -u www-data php occ  maintenance:install --database \
"mysql" --database-name "nextcloud"  --database-user "root" --database-pass \
"password" --admin-user "admin" --admin-pass "password"

Where password is the appropriate password for the user. That returns the following error:

In Install.php line 127:

  Database < mysql> is not supported.

I’ve also tried mariadb, which returns the same error (except it says mariadb is not supported).

All of the required PHP modules are installed. The MariaDB server is installed and running, and the database has been configured.

Sure abut that? What does php -m say? Did you restart the webserver service after you installed the php modules?

How exacteley did you create the database for nextcloud? Did you create a user in the database and “grant all privileges” on that database to that user? Did you also “flush privileges” or restart the mariadb service after you granted privileges?

From my notes:

Create a database user and a database for Nextcloud

mysql -uroot -p
CREATE USER 'ncdbuser'@'localhost' IDENTIFIED BY 'ncdbpassword';
CREATE DATABASE IF NOT EXISTS ncdb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON ncdb.* TO 'ncdbuser'@'localhost';
FLUSH privileges;
quit;

Installation:

sudo -u www-data php occ maintenance:install \
--database "mysql" --database-name "ncdb" \
--database-user "ncdbuser" --database-pass "ncdbpassword" \
--admin-user "Nextcloud-Admin-User" --admin-pass "admin-password" \
--data-dir "/path/to/ncdatadirectory"

Yes, I did that.

I figured it out; the issue was that I was not putting any line breaks in but was preserving the backslashes.

ah ok. i was almost sure it was just something small that went missing, that’s why i asked all thes maybe obvious questions and posted my notes for comparsion. Anyways… glad it worked out. :slight_smile: