No Nextcloud Database

@ Michel

What port number did you use?The default in phpmyadmin is 3306. The config.inc.php file uses localhost for the host, rather than 127.0.0.1. 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 127.0.0.1 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.

Michel-André

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

Hi @dalbring

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

Michel-André

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 ?

Michel-André

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 127.0.0.1 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 127.0.0.1 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:

2 Likes

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

3 Likes

Silently in the background. My man
!

1 Like

and another thing to maintain


1 Like

Thank you so much, Stephane!

2 Likes

Also trying desperately to connect phpmyadmin to Nextcloud’s database.

I’m fiddling with phpmyadmin’s config file for some time now and I can’t understand why it doesn’t work.

I replaced the standard nethserver settings (the one that connects to the regular mysql server) by something like what Stephane showed on that post No Nextcloud Database - #17 by stephdl

I think it somehow works BUT there is always that f*** login screen that asks for a login and password, but I can’t figure out WHAT password since if I understand correctly there is no password needed when connecting through the socket.

It blows my mind.

So I looked for something else, and found Adminer

Copied Adminer’s single php file into Nextcloud’s root folder. No installation nor configuration needed.
Entered the same credentials as in Nextcloud’s config.php file.

And boom, here I was.
Bye bye phpmyadmin, I never really loved you :blush:

2 Likes

So that’s how adminer works.

Could you share how exactly you did this (just being lazy here)

My Apologies here, My brain was actually on Nethserver 8 when posting this

matthieu where have you been this last months, NS7 is over, please play with NS8

1 Like

Just keep an eye on the current development rate and possible “oldish” PHP code


Sure Steph, but the thing is, correct me if I’m wrong, there is yet no sure path to simply upgrade an existing installation without too much fuss. That’s including VPN tunnels between two servers, DHCP, firewall zones, VLANs and so on. Nothing custom, but a somewhat complex situation. I guess that’s another story but right now neither my customers or me can afford to invest a lot of time into this.

For such a tool that’s a one shot so I don’t care. I just need to visually edit a database to troubleshoot a bug I found.

There is really nothing else to say than what I wrote :

Copied Adminer’s single php file into Nextcloud’s root folder

Than visit https://nextcloud.example.net/adminer.php and it’s done.

1 Like

I hope you’re not having my kind of situation av had to build an sso module and was just about to build vpn till I saw @stephdl is going to work on one, so am waiting for his.