

And check the journal ( sudo journalctl -eu nginx) to find out why it fails to start. If Nginx fails to start, run sudo nginx -t to find if there is anything wrong with your configuration file. Start Nginx with sudo systemctl start nginx. Reload Nginx to have the configuration take effect service nginx reload You can check Nginx status with sudo systemctl status nginx. Here’s a sample config for running phpMyAdmin under the subdomain Ĭreate an Nginx config file nano /etc/nginx/sites-available/phpmyadminįastcgi_pass unix:/run/php/ įastcgi_split_path_info ^(.+\.php)(/.+)$ įastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name Ĭreate a symbolic link to enabled sites ln -s /etc/nginx/sites-available/* /etc/nginx/sites-enabled/ Follow the prompts, filling in your MySQL database credentials.

When prompted Host name of the MySQL database server for phpmyadmin: select new host. When prompted Connection method for MySQL database of phpmyadmin: select TCP/IP When prompted reinstall database for phpmyadmin? select yes. Invoke dbconfig-common dpkg-reconfigure phpmyadmin Tell dbcommon-config we want to use a remote database nano /etc/dbconfig-common/configįind the following line dbc_remote_questions_default='false'Ĭhange it to dbc_remote_questions_default='true' When asked Configure database for phpmyadmin with dbconfig-common? select no When asked Web server to reconfigure automatically: select none
#Phpmyadmin nginx error install#
Update, install phpMyAdmin and some dependancies apt-get update apt-get install phpmyadmin php-mbstring php-gettext Grant all privileges GRANT ALL PRIVILEGES ON *.* TO GRANT USAGE ON *.* TO WITH GRANT OPTION Ĭreate a phpMyAdmin user with access from the web server and grant privileges CREATE USER IDENTIFIED BY 'supersecurepassword' GRANT ALL PRIVILEGES ON phpmyadmin.* TO privileges to have everything take effect FLUSH PRIVILEGES Restart MySQL to apply changes service mysql restartĬreate a root user that can login from the web server CREATE USER IDENTIFIED BY 'supersecurepassword' Or change to the server’s local IP address bind-address = 192.168.0.100 To allow remote access to the MySQL, open the following file in a text editorįind the following line bind-address = 127.0.0.1Įither comment it out like so #bind-address = 127.0.0.1

Here are guides for Nginx and MySQL Server. This guide assumes you have already deployed separate MySQL and Nginx (with php 7) servers on Ubuntu 16.04. If you’ve ever wanted to do something similar, today is your lucky day. One thing I always meant to do but never got around to figuring out was the initial setup of phpMyAdmin with a remote MySQL server. I’ve been rebuilding my lab recently, most notably breaking down my LXD stack into individual Ubuntu virtual machines for each service.
