简体   繁体   中英

It is possible to open phpMyAdmin on a MySQL Server and use it from any computer in a network?


I've set up a MySQL Server on a Ubuntu Computer and added the phpMyAdmin interface to it in order to have a more graphic view of what is happening and easier interactions.

It works properly on my Ubuntu Computer but the trouble comes from when I'm trying to connect to it through another computer on my network.

Indeed, my goal is to be able to connect to the web interface provided by phpMyAdmin from any computer on my private network.

So the question I'm asking is, can I do it or it isn't possible ?
I've already done some test, and edited the configuration of the MySQL Server in order to open it from any device on my network

I guess that there is another solution installing phpMyAdmin on each devices that will use the database but I can't know how much, so I won't be able to prepare all of them.

I can provide any piece of configuration if it is required to you guys to have a little help !

Thanks a lot for your time and help fellas ! :)

Yes, this is possible. phpMyAdmin is just a series of web pages, and your web server is happy to service those requests whether it comes from your local machine or from another computer on the network. In fact, you're probably already set up for that. Regardless of whether you've downloaded the official source file from phpmyadmin.net and uncompressed that in your web root or used the Ubuntu packaged version, I believe both are open to incoming connections from other machines (the Debian package is built this way, and while I don't have a Ubuntu machine handy it's the same package manager so any deviation would surprise me).

There's some misinformation in some of the other comments that I feel should be cleared up. Since you've specifically asked about connecting from your own private network, you do not need to get a public address (you'll just use the private address or hostname if your network is properly configured) nor do you need to open any port on your router. You should, in fact, make sure the port is not opened on your router because then anyone on the internet could potentially brute force your password and cause you grief.

I keep my phpMyAdmin in a folder called phpmyadmin in my web root, so I access it in the same way someone using the packaged version would; http://localhost/phpmyadmin or http://192.168.1.97/phpmyadmin or http://isaacs-laptop/phpmyadmin — obviously, you'll need to adjust the IP address or hostname because yours will be different (just find out the local IP address of the machine running the web server and use that).

One option that I recommend against is to put phpMyAdmin on every machine you're planning to use and connecting it to the remote MySQL instance (over port 3306). The end result is the same; you can access a phpMyAdmin instance that connects to your database, but that adds additional network complexity, potential password problems, a fragmented base of phpMyAdmin installations that all must be kept up-to-date, and forces you to expose the MySQL server to your local network.

In short, it should work fine as long as you use the webserver's IP address to connect from the remote browser. If you're getting an error, you should paste the error message and log file segment here so we can look at it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM