View previous topic :: View next topic |
Author |
Message |
musv Advocate
Joined: 01 Dec 2002 Posts: 3368 Location: de
|
Posted: Wed Dec 02, 2020 10:39 am Post subject: PHPMyAdmin - Local installation - remote IP |
|
|
Hi there,
I've installed PHPMyAdmin (just downloaded the tar.xz from the project site) and got it running via Nginx.
Configuration:
NAS (192.168.109.10): MariaDB, Nginx, PHPMyAdmin
Remote machine (192.168.109.85): Webbrowser
MySQL-Users:: | +-------------+-----------+-------------------------------------------+
| User | Host | Password |
+-------------+-----------+-------------------------------------------+
| root | localhost | *4C48E0A90CFEF601B9F377E50xxxx |
When I load on the Remote machine the phpmyadmin page and try to login, I get the following error:
journal: | Dez 02 11:17:43 kobold phpMyAdmin[28558]: user denied: root (mysql-denied) from 192.168.109.85 |
I understand the problem, but it's confusing me.
Expected:
Browser (Remote machine, 192.168.109.85) -> PHPMyadmin (Kobold, 192.168.109.10) ---> [Connection via Socket/Localhost (127.0.0.1)] ----> MariaDB (Kobold, 192.168.109.10)
Instead PHPMyAdmin is forwarding my real IP to the database. That's a disadvantage, because I have to open the database for the database root user in the whole network. Is there a way to get the expected behaviour? |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1864 Location: Germany
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Dec 02, 2020 12:45 pm Post subject: |
|
|
That error's coming from phpmyadmin, it's not actually forwarding your IP to mysql (it can't do that). |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3368 Location: de
|
Posted: Wed Dec 02, 2020 3:13 pm Post subject: |
|
|
Banana wrote: | that is indeed strange. Maybe the error message is misleading. Does is work if you connect with that user on 192.168.109.10 directly? |
192.168.109.10 doesn't have any graphical environment installed.
Hardware: Bought it in January and received it 2 months ago. Nice gadget. Currently I'm building up my homeserver for everything on it.
Ant P. wrote: | That error's coming from phpmyadmin, it's not actually forwarding your IP to mysql (it can't do that). |
Thanks. Nevertheless I found this description.
So I created a different user with root privileges allowed from localhost and from '%'. And it works. That's not, what I wanted, but I didn't find any better solution. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Dec 02, 2020 4:08 pm Post subject: |
|
|
If you know it's only going to be accessed over localhost, bind_address=127.0.0.1 in the config file should help. Other local processes can still get in, but it's better than nothing (the default). |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1864 Location: Germany
|
Posted: Wed Dec 02, 2020 4:18 pm Post subject: |
|
|
Quote: | 192.168.109.10 doesn't have any graphical environment installed. |
If you have terminal access you should be able to use the cli interface from mysql.
Quote: | So I created a different user with root privileges allowed from localhost and from '%'. And it works. That's not, what I wanted, but I didn't find any better solution. |
could be that using 127.0.0.1 instead of localhost can solve this issue for you. Using from % is not a good idea. If it is only accessable from your local LAN, well then it is up to you.
Quote: | Hardware: Bought it in January and received it 2 months ago. Nice gadget. Currently I'm building up my homeserver for everything on it. |
Damn. Looks good, but sold out in the store. _________________ Forum Guidelines
PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3368 Location: de
|
Posted: Wed Dec 02, 2020 10:07 pm Post subject: |
|
|
Banana wrote: | If you have terminal access you should be able to use the cli interface from mysql. |
Accessing mysql/mariadb via cli isn't the problem, PHPMyAdmin was.
Banana wrote: | Using from % is not a good idea. If it is only accessable from your local LAN, well then it is up to you. |
I know. But the databases aren't really important. It's just my Wiki and the Kodi database.
Banana wrote: | Damn. Looks good, but sold out in the store. |
I was looking at this gadget for about 3 years (precessor Helios4). And 2 weeks ago I bought in Mediamarkt 1 Crucial SSD 2TB for 166€ and 2 WD My Book disks (12TB, WD Red Plus CMR) for 170€/each. So I have currently 3 disks with 26 TB (ok 23.6 TiB) inside the Helios. It's a perfect 24/7 server for everything (except Virtual machines). |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1864 Location: Germany
|
Posted: Thu Dec 03, 2020 7:37 am Post subject: |
|
|
Quote: | I was looking at this gadget for about 3 years (precessor Helios4). And 2 weeks ago I bought in Mediamarkt 1 Crucial SSD 2TB for 166€ and 2 WD My Book disks (12TB, WD Red Plus CMR) for 170€/each. So I have currently 3 disks with 26 TB (ok 23.6 TiB) inside the Helios. It's a perfect 24/7 server for everything (except Virtual machines). |
I added this device to my whishlist. Current running a raspberry and 4 USB3 disks as a small NAS. Not running 24/7 so it is enough for me right now. _________________ Forum Guidelines
PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire |
|
Back to top |
|
|
|