Remote access to mysql server? (Win7 64) 1.7.7 [SOLVED]

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

Remote access to mysql server? (Win7 64) 1.7.7 [SOLVED]

Postby Alerek » 15. December 2011 16:23

Hello there! I'd like to preface this with while I have many years of experience dealing with a wide variety of programs, but I've never used mysql, prior to a couple of days ago.

My experience with it is quite limited, but I am able to use it as a database for a game server I'm hosting, and for all intents and purposes is working beautifully, and WAY more efficient than sqlite. I'd like to offer access to this mysql database to my server admins, but I've not had much experience with xampp outside of setting up this server, for the other server. I've looked around quite a few places in the program, and it's very easy to tell that I'm going for something that is extemely simple in comparison to what this program is used for by acutal companies, etc. I'd really not like to botch this, especially since I have it working so well already. All I really want to accomplish is to assign a port for the mysql, so that someone from an entirely different IP can connect to it & manage, by typing in (what I would assume would be) myip/phpmyadmin into their browser.

Would there be a better / easier way to go about attaining that goal? Would it be better to use a client of some sort? Any help at all with setting this up would be greatly appreciated~
Alerek
 
Posts: 3
Joined: 15. December 2011 16:11
Operating System: Windows 7 64bit

Re: Remote access to mysql server?

Postby Sharley » 16. December 2011 00:29

You don't assign a separate port for MySQL but you do give permission for a particular IP to access XAMPP system files like phpMyAdmin as for obvious reasons these system files are protected and only available to the localhost server administrator by default.

You can also give access to a particular database for other than localhost if that is what you want.

Is the IP you want to give access to on your LAN or WAN?
User avatar
Sharley
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

Re: Remote access to mysql server?

Postby Alerek » 16. December 2011 20:21

No, the IP I want to give access to is remote. Can I allow a non LAN ip access a given database?
Alerek
 
Posts: 3
Joined: 15. December 2011 16:11
Operating System: Windows 7 64bit

Re: Remote access to mysql server?

Postby Sharley » 16. December 2011 23:30

No, the IP I want to give access to is remote. Can I allow a non LAN ip access a given database?
Under Privileges in phpMyAdmin find the user for that given database and then click on Edit Privileges near the end of the line and under the Hosts section change it to Any host % from Local localhost then click Go.

Remember that using the super user root for individual databases is a security risk and therefore a specific username and password should be assigned to each database you create.

Now that IP can access if they know the username and password you allotted to that specific database.

If you want that IP to be able to access phpMyAdmin then you will have to edit the \xampp\apache\conf\extra\httpd-xampp.conf file and add the IP to this section like so
# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
Allow from nnn.nnn.nnn.nnn
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Save the file and restart Apache then that IP should be able to access phpMyAdmin by typing http://yourIP/phpmyadmin and providing the user password combo you provided for a given database.

Let me know please if the above is what you want and if it works for you.
User avatar
Sharley
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

Re: Remote access to mysql server?

Postby Alerek » 17. December 2011 01:23

Yes this is exactly what I was looking for! Thank you!! I know it's a very simple thing, and my description probably wasn't very helpful~ Thank you Thank you Thank you!!
Alerek
 
Posts: 3
Joined: 15. December 2011 16:11
Operating System: Windows 7 64bit

Re: Remote access to mysql server?

Postby Sharley » 17. December 2011 01:26

You're welcome and thanks for the feedback. 8)

I will mark this now as solved.

Good luck. :)
User avatar
Sharley
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 144 guests