How to access my database stored in PHPMyAdmin from different computers?

0

1

I am working on my Java application in Eclipse that connects to the database and makes some queries with the data. This database has been created and managed in PHPMyAdmin. The database is stored locally and now I would like to make it accessible not only from my computer, but for anyone who will run my application on his computer. Can anyone tell me what is the procedure?

Should I install mySQL server on my computer, export the database from PHPMyAdmin and import the database there? But I guess this is not the good solution for accessing the database from remote computers.

Should I rather store database "online"?

I know this question is not so much straight-forward, but I hope you will give me some idea how to deal with it.

MichalB

Posted 2013-05-07T20:00:19.797

Reputation: 101

Answers

1

PHPMyAdmin is a web interface to mysql server. So your data are already on a mysql server instance on your computer. You have two choices:

  • Keep the database on your computer and administrate it properly
  • Put it somewhere online to delegate management to experienced users.

If it is for a production environment, then I recommend you the second choice. If it is for a development environment, then you can keep database on your computer and open the database to other computers.

There are several points that must be done in order to allow remote access:

  • Having a network configuration that permit to access your computer on port 3306 from internet
  • Opening the port 3306 on your computer firewall
  • Be sure that mysql server is listening on port 3306
  • Configure mysql to allow access on chosen database from external location

The last step is usually the problematic one, because often forgotten. By searching on google you will find explanations for each step.

StreakyCobra

Posted 2013-05-07T20:00:19.797

Reputation: 411

The application is under the development and is a part of Master thesis. The only reason why I want to make it accessible remotely is that my supersvisor will want to take a look on it. Maybe a stupid question - when I keep the database locally on my computer, do I need the keep the computer all the time on? Thanks. – MichalB – 2013-05-07T20:28:13.687

Yes, to access the database, locally or remotely, the computer has to be on and mysql server running. – StreakyCobra – 2013-05-07T20:30:08.710

Because of that I think it is not a good solution, I cant keep my laptop all the time on, without knowing when other user(s) will access the database ... can be moving the database into a remote server the solution? I guess this is the second option you suggested. – MichalB – 2013-05-07T20:35:26.400

2That seems to be the better solution in your case. I have not ever tried free mysql providers, so I have not any to recommend. It exists paying providers which are usually better (because you pay for it). A last solution in your case, but more interesting, is to ask your university to host your database in their server (looks with IT service). – StreakyCobra – 2013-05-07T20:46:41.220