NS8 VM on Proxmox & Mariadb with PHPMyAdmin

NethServer Version: NS8
Module: Mariadb and PHPMyAdmin
I have Nethserver 8 on a Debian12 VM in Proxmox. Additionally, I have a Nethsecurity 8 VM in Proxmox. I have two NICs on the Proxmox PC; one for internet access using a public IP from my ISP. The other NIC is for office LAN access to the Proxmox GUI. I then configured both a WAN NIC and a virtual NIC on the Nethsecurity VM. The same virtual NIC I have assigned to the Debian 12 VM, which gets it local IP address from the Nethsecurity VM. To access Nethserver 8 and the apps across the internet, I had to create port forwarding rules in Nethsecurity 8, to direct traffic from the WAN IP to the LAN IP. I got this all working smashingly. Shwew, it was tough and cumbersome to get it there, but it is working now.

The https://subdomain.domain.com is the same for Nethsecurity and Nethserver, as can be imagined. The difference is the former uses :9090 in the address bar and the latter uses /cluster-admin. Both seem to work just fine, although Nethserver seems quite sluggish, but that’s a later worry.

Now, within the Nethserver 8 VM, I first installed Nextcloud, which seems to be working. It has a subdomain name of ‘cloud’, so, https://cloud.domain.com.

I didn’t realize I needed to enable the Nethforge repo to find the Webserver and Mariadb, until I searched this forum. I’ve since installed both, albeit after Nextcloud. I’m thinking Nextcloud doesn’t need the same instance of Mariadb as the webserver, since it’s part of the default repo. I made /PHPMyAdmin the path for Mariadb, so to access it I’m using https://subdomain.domain.com/phpmyadmin. I get to the login page and enter admin:admin, but it appears mysql is denying access. I tried my Nethserver credentials and same thing. I tried my root credentials and the same thing. I don’t know what I’m missing. The phpmyadmin doc for NS8 says admin:admin.

Just to be sure, admin:admin means

username: admin
password: admin

Are there errors in the logs? You can check it at the logs page.

To reset the admin password, you may use following steps…

Enter the mariadb1 environment:

runagent -m mariadb1

Reset admin password to admin:

podman exec -ti mariadb-app mysql -D mysql -e "ALTER USER admin@127.0.0.1 IDENTIFIED BY 'admin'"

Exit mariadb env:

exit

Yes, it does. Thanks for asking.

Here’s what I see in my browser when trying to access phpmyadmin.

Here’s the related system logs within the NS8 cluster-admin console.

2025-01-07T09:49:46-05:00 [1:mariadb1:phpmyadmin-app] 10.0.2.100 - - [07/Jan/2025:14:49:46 +0000] "GET /phpmyadmin/ HTTP/1.1" 200 5873 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0"
2025-01-07T09:49:46-05:00 [1:traefik1:traefik] 99.32.54.25 - - [07/Jan/2025:14:49:46 +0000] "GET /phpmyadmin/ HTTP/2.0" 200 4443 "-" "-" 8469 "mariadb1-https@file" "http://127.0.0.1:20003" 328ms
2025-01-07T09:49:54-05:00 [1:webserver1:sftpgo] {"level":"debug","time":"2025-01-07T14:49:54.000","sender":"eventmanager","message":"loading updated rules"}
2025-01-07T09:49:54-05:00 [1:webserver1:sftpgo] {"level":"debug","time":"2025-01-07T14:49:54.000","sender":"dataprovider_sqlite","message":"start user cache check, update time 2025-01-07 14:39:54 +0000 UTC"}
2025-01-07T09:49:54-05:00 [1:webserver1:sftpgo] {"level":"debug","time":"2025-01-07T14:49:54.000","sender":"eventmanager","message":"recently updated event rules loaded: 0"}
2025-01-07T09:49:54-05:00 [1:webserver1:sftpgo] {"level":"debug","time":"2025-01-07T14:49:54.000","sender":"eventmanager","message":"event rules updated, fs events: 0, provider events: 0, schedules: 0, ip blocked events: 0, certificate events: 0, IDP login events: 0"}
2025-01-07T09:49:54-05:00 [1:webserver1:sftpgo] {"level":"debug","time":"2025-01-07T14:49:54.000","sender":"dataprovider_sqlite","message":"end user cache check, new update time 2025-01-07 14:49:54 +0000 UTC"}
2025-01-07T09:49:54-05:00 [1:mariadb1:mariadb-app] 2025-01-07 14:49:54 26 [Warning] Access denied for user 'phpmyadmin'@'127.0.0.1' (using password: YES)
2025-01-07T09:49:54-05:00 [1:mariadb1:mariadb-app] 2025-01-07 14:49:54 27 [Warning] Access denied for user 'admin'@'127.0.0.1' (using password: YES)
2025-01-07T09:49:54-05:00 [1:mariadb1:phpmyadmin-app] 10.0.2.100 - - [07/Jan/2025:14:49:54 +0000] "POST /phpmyadmin/index.php?route=/ HTTP/1.1" 200 6166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0"
2025-01-07T09:49:54-05:00 [1:traefik1:traefik] 99.32.54.25 - - [07/Jan/2025:14:49:54 +0000] "POST /phpmyadmin/index.php?route=/ HTTP/2.0" 200 4622 "-" "-" 8470 "mariadb1-https@file" "http://127.0.0.1:20003" 10ms

Logged in as root on the Debian 12 VM that NS8 resides on, then using your runagent command and then podman command, gives me an error saying, access denied for user 'root'@'localhost'(using password YES).

Almost like I need to be logged in as ‘admin’ in the mariadb environment to be able to reset admin’s password.

It should be possible to login as root without password as the mysql root password is stored in the .my.cnf file in the container.

podman exec mariadb-app cat /root/.my.cnf

Maybe it helps to click save in the NS8 app settings to start reconfiguration.
But I guess something went wrong at installation (like database init) so I think in this case it’s the easiest way to just remove mariadb and reinstall it.
If there are still issues please share the logs after installation and first configuration.

Thanks Markus. I did a number of steps after uninstalling Mariadb. I created a new subdomain in the DNS of my domain host. I did this to differentiate between the Nethsecurity and Nethserver VMs (mentioned in my original post above). Then I used this when creating a domain and user in cluster-admin (I hadn’t done this combination yet). I used the newsubdomain.domain.com as the domain when configuring. I then installed Mariadb and configured it. Now https://newsubdomain.domain.com/phpmyadmin got me in using admin:admin. I was then able to assign a new password to phpmyadmin. Thanks for your input. It’s a great forum when even the gurus help you out with problems. Going through all these cumbersome steps and then R&D’ing will lead me to a decision if I want to keep a proxmox pc and its VMs to replace dedicated equipment we’re currently using. One of them is NS7. I’ll purchase NS8 subscriptions if and when it makes sense to make the leap to Nethsecurity 8 and Nethserver 8.

1 Like