Need help - remote access to MySQL

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Need help - remote access to MySQL

Postby grosskopf » 01. February 2011 22:33

Here's what happened:

Something's gone wrong with my VPS and RDP is disabled. XAMPP is still working, as my website is still running, as are my MySQL database and FIleZilla. Now, I never got around to allowing a connection to my MySQL databases from my home computer because I never needed to do it. I tried accessing phpMyAdmin here: http://(my server ip)/phpMyAdmin/ and I got the error "Access forbidden! Access to the requested directory is only available from the local network. This setting can be configured in the file "httpd-xampp.conf". etc...

Here's my question: How can I make it so that either I can access the phpMyAdmin page, or so I can allow remote connections to my MySQL database from my computer. I looked at the httpd-xampp.conf file, but I couldn't quite figure out what I was doing.
Posts: 18
Joined: 23. December 2010 02:02

Re: Need help - remote access to MySQL

Postby Sharley » 02. February 2011 01:07


Always make a backup before editing any .conf or.ini files in XAMPP by simply 'drag and drop' and at the same time holding down the Ctrl key to make a 'Copy of' the file - you always then have a point to return to that you know worked before you made your changes.

You can add your single IP to the New XAMPP security concept section in the httpd-xampp.conf file that should allow access to the list of folders also in that section.
Allow from ::1 \
Keep a single space between entries using the other entries as an example. Save the file and restart Apache.

Do not post this IP on any open forum and try and keep it known to only those you trust or you may open a big security hole.

Alternatively you can add another section below the default for the phpmyadmin folder only thereby keeping the defaults in place, like so
<LocationMatch "^/(?i:(?:phpmyadmin))">
Order deny,allow
Deny from all
Allow from ::1\
fc00::/7 \

ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
This is in addition to the unchanged default section and goes in as the next entry in the conf file below the default section with a single space between them.

When you get access to phpMyAdmin select your database and change the host setting to % (any host).

Restart MySQL to be sure that your changes have been read.

Recommended - if you are paranoid then delete your edits in the httpd-xampp.conf file and return the section to the defaults, knowing now how to create an access for your IP when ever you need it, save the file and restart Apache.

I have no way of testing this for you, so feed back on this solution will be most helpful.

Good luck.
User avatar
AF Moderator
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 99 guests