0

I have a MySQL database running at a site using phpMyAdmin. My problem is that I want to use this database inside a Java application which runs as a regular, non browser, application. The problem is what connection string do I use?

I have my application reading MySQL and Microsoft SQL Server databases on a hospital network. Outside the hospital, the user first needs to get behind the hospital firewall and then my application can give a connection string and attach to the database and make queries. My feeling is the phpMyAdmin does the job of getting behind the firewall, but I then need to know what string format I need to attach to the database. Perhaps there is something else and not phpMyAdmin which I should be using instead? I have no problem working inside the phpMyAdmin GUI on the browser, but I want to work in my own application. How do I do such a thing? Can phpMyAdmin even handle such a case?

Any suggestions would be greatly appreciated. Ilan

0

You probably cannot do this. phpMyAdmin is often used when you don't want to allow general remote access but you want to provide a way to manipulate the DB remotely. Because phpMyAdmin runs on the server it can access the DB without MySQL having to be configured to allow remote connections. If you want your app to be able to access that DB you're going to need to either put it on the MySQL server (or design a system which can parse the info you need from the phpMyAdmin interface [which is very difficult]).

| improve this answer | |
  • Thanks. I'll what the possibilites are for changing the MySQL server. Do you happen to know if the site generally comes with MySQL preinstalled or the user installs it? I'll have to go to the site owner. – Ilan Tal Dec 10 '14 at 9:09
  • MySQL is not pre-installed on any OS I know of. I've seen it preinstalled on several VM appliances though. If you have phpMyAdmin then you probably have the ability to backup the entire DB. You could install your own MySQL server on your machine and then import one of those backups into it. This will allow you to connect to it locally from your computer. Depending on you app this may be good enough. IDK enough about what your app is for to know the best way to handle this. – krowe Dec 10 '14 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.