PHPMyAdmin (PHP + MySQL + Admin) is a popular PHP based GUI front end for MySQL administration. But for anyone who’s tried to install it on top of an LEMP stack knows that it doesn’t allow an automated config for NGINX, and can often leave new users dumbfounded about how to access the application. For NGINX setups, you will have to manually do this.
First, we will make sure the system is updated.
Next, we install PHPMyAdmin.
#apt-get install phpmyadmin
When prompted to configure phpmyadmin, select “yes”.
Enter a password when it asks you to do so. Remember this password.
In the next prompt, choose not to configure for a web server. This is because you are running NGINX, and that’s not a choice.
Configuring NGINX to serve PHPMyAdmin
At this point, you have successfully installed the package on your system, but have no way to access it. We only need to write a quick nginx config to point to the installed path of PHPMyAdmin.
The package is installed to
/usr/share/ . But, we can always create a sym-link to the place from a convenient webroot location. To do so,
$ln -s /usr/share/phpmyadmin phpmyadmin
Next, we need to write an NGINX config to actually use phpmyadmin from the webroot. Make the server listen to your favorite port number, and ask it to serve the webroot for phpmyadmin.
Once you have written and enabled this config file, simply reload or restart nginx to then access the application console via
mysite.com/phpmyadmin, where this new nginx config serves for
#service reload nginx
- Natural Selection as a Path Process
- Installing NON on an R-Pi