Page 1 of 1

phpMyAdmin - login remotely

PostPosted: 07. February 2017 16:23
by rogerfgay
I've set up XAMPP (3.2.2) on Windows 10 for use by high school student in a first year web development course. They each have their own private database in MySQL and I want them to be able to log into phpMyAdmin to access their databases. None of them will be on the server machine. I also want to be able to log in remotely as root. I've done a great deal of googling and played with config.inc.php a lot. So far, I've configed in a way that root is logged in automatically from everywhere; and changed that so that things work well locally but remotely I get
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)

That's where I am now.

Goal:
1. Allow access and force login from any computer in the world.
2. Allow logout
3. Log out automatically on timeout (and when browser closes if possible).

Re: phpMyAdmin - login remotely

PostPosted: 07. February 2017 18:18
by nhatminh1209
same here, lol :)). I want it too

Re: phpMyAdmin - login remotely

PostPosted: 07. February 2017 19:54
by rogerfgay
BTW: I don't know if the XAMPP version I gave is accurate. That's the version given on the control panel, and perhaps refers only specifically to the control panel itself.
I just did this and used the most up-to-date XAMPP I could find -- came from Apache Friends. Has v7 PHP.

Re: phpMyAdmin - login remotely

PostPosted: 13. February 2017 12:44
by rogerfgay
Maybe it would help me if I at least understood why this is so difficult.
Seems like it would be pretty normal to do it.

Yet, through my many hours of googling and checking stackoverflow, etc. I'm seeing a lot of "this changed worked for me" instead of a straight answer about what should be done.
It's a question often asked, but seems pretty short on answers.

Re: phpMyAdmin - login remotely

PostPosted: 17. April 2017 19:32
by willichan
All of the help docs still say to change the LocationMatch line in httpd-xampp.conf. That line no longer exists.
Remote access to phpMyAdmin is apparently being blocked by an different method now.

It would be nice to have an updated instruction that outlines how to change this behavior with the new method being used.

There are a great many reasons for not blocking phpMyAdmin on remote systems. For a setup that claims to be for development and testing rather than production, this seems to me like a somewhat ridiculous item to put such tight restrictions on.

Re: phpMyAdmin - login remotely

PostPosted: 17. April 2017 21:17
by willichan
Well, after an entire weekend of messing with this, I have a solution that works for me.

Allow Remote Access - xampp\apache\conf\extra\http-xampp.conf
I replaced the phpmyadmin section (line 90?) with the following
Code: Select all
    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
    <Directory "C:/xampp/phpMyAdmin">
        #AllowOverride AuthConfig
        #Require local
        #ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
      AllowOverride All
      Require all granted
    </Directory>


Require login on access - xampp\phpMyAdmin\config.inc.php
Change authentication type (line 20?) from this
Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'config';
to this
Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'cookie';