No Nextcloud Database

NethServer Version: 7.9.2009 (final)
Module: nextcloud

I installed nethserver-nextcloud after getting my nethserver up and running. Nextcloud works fine, but the install never created a nextcloud user or a nextcloud database in mariadb. I also installed nethserver-phpmyadmin, which works fine as well. Using it, I can see there is no nextcloud user or database. I also confirmed this in shell. Should I be concerned with this, knowing Nextcloud is working? I was hoping to backup the database, in the event of a crash.

I am backing up data on a thumbdrive, using nethserver backup. It includes /var/lib/nethserver, which includes /var/lib/nethserver/nextcloud and also /var/lib/nethserver/backup/rh-mariadb105. In the latter directory, there is a nextcloud.sql file. I wonder why whoever developed nethserver-nextcloud didn’t have it actually using mariadb’s databases? It looks like it creates a db in a sql format - just doesn’t put it in the mariadb databases. Am I missing something?

Below is the related nextcloud config script:

  'datadirectory' => '/var/lib/nethserver/nextcloud/',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/run/rh-mariadb105-mariadb/nextcloud-mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',

It is using mariadb but in Nethserver there is the default MariaDB (v5.5, if memory serves me well) and then a higher version for specific services like Nextcloud.
What you see through phpMyadmin is MariaDB 5.5

Thanks for that. I wondered about that. So, I was missing something. Is there a way to get phpMyadmin to tap into the different versions of mariadb on my server?

There was a similar question but with no direct solution, as far as I remember.

Of course, you can connect to MariaDB 10.5 from command line using the right mariadb version and the socket.
Here are some examples: Nextcloud upgrade problem - #2 by dnutan

Thanks. It doesn’t look like there’s a solution for phpmyadmin to access all the sockets and databases from the different versions of mariadb. It kinda blows my mind that there are different versions on the server. I suppose I should just rest in the fact that my nethserver data backup includes the nextcloud data.

You may want to ping @stephdl and or @mrmarkuz about this.

Hi @dalbring and @dnutan

A wild guess !

If I remember correctly, when installing different applications that use a different version of MariaDB-x.x on a NetgServer; some applications that want to communicate with the database use: localhost:port and others use:

If I didn’t use the correct “nomenclature”, the database was unable to connect.
Just by changing the port number, the application was able to connect to any version of MariaDB on the NethServer.


1 Like

It should be possible but didn’t try the file method mentioned in the other post. I remember I tried to manually input the socket connection information in phmyadmin connection fields but didn’t succeed at that time.

Don’t take chances

Put the name of the root directory of the DB into the Backup include file.

Note: If I remember right, you have to end the path with a trailling / to differentiate a full direrctory from a single file.
Check the size of the DB.
Search the Backup for the directory if it’s there; only one result; or two if it was already in the standard Backup.


@ Michel

What port number did you use?The default in phpmyadmin is 3306. The file uses localhost for the host, rather than On top of that, it uses the socket for mysql rather than mariadb. How would changing the port number allow the choice of any db version without running the proper socket?

$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock';
$cfg['Servers'][$i]['connect_type'] = 'socket';

HI @dalbring

I remember port:
3311 for nethserver-rh-mariadb101
3312 for nethserver-rh-mariadb102
3313 for nethserver-rh-mariadb103

You can try by changing only localhost for and restart everything but the best is a reboot after the change to restart brand new.

For the:

you will have to find out
 (see reply below for a test)

Also, clear the browser cache.


Example for the config of Dolibarr with nethserver-rh-mariadb102

Hi @dalbring

3306 is the default port to access the default MySQL/MariaDB


From NextCloud

For the socket for phpmyadmin try the above one from NextCloud path as:
$cfg[‘Servers’][$i][‘socket’] = ‘/run/rh-mariadb105-mariadb/nextcloud-mysql.sock’;

It will be a good test ?


OK. I’ll try that when I get back to the office. I found out this afternoon that phpmyadmin doesn’t like the use of for the host address. It won’t let me login unless I use localhost. Even if I get it to work, I think my next hurdle will be the proper credentials to login. I created a user in the default db using the phpmyadmin gui, but the later versions will no doubt require a different user. My experience has been that phpmyadmin won’t allow root logins, but I’m new to nethserver and the use of the newer versions of mariadb.

localhost is for linux socket and is for tcp port IIRC

I never did a port to phpmyadmin to use RH mysql-105 but I am opened to pull request :smiley:

just a bit busy on NS8 to upgrade my modules
sorry I am just a man :confused:


this is what I modify for rh-mariadb103

1 Like

this is the configuration of nextcloud to mariadb-105:

my concern with nextcloud is it is really specific to that application and if I open it specifically to phpmyadmin I need to do it for any other applications :frowning:

At a time I got the idea to patch rh-mariadb105 like I did for mariadb-103 to introduce a linux socket to use it because after the installation of rh-mariadb105, the service is up but without configurations IIRC


Silently in the background. My man

1 Like

and another thing to maintain

1 Like

Thank you so much, Stephane!