How to install phpMyAdmin with ERPNext on Ubuntu 18.04 server

Hi,

I am trying to install phpMyAdmin on an Ubuntu 18.04 server where ERPNext is installed and running. I have tried the following till now but I am not able to get phpMyAdmin to work.

sudo apt-get install phpmyadmin

sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin

I then tried to access http://IP_Address/phpmyadmin but it shows page missing error as below;

I also tried redirecting the symlink to the ERPNext default site1.local using the following command but still the same error

sudo ln -s /usr/share/phpmyadmin /home/frappe/frappe-bench/sites/site1.local/public

I’ve referred the following 2 links:

Did you ever get this to work? I just installed phpmyadmin and get the same error.

1 Like

sudo nano /etc/nginx/snippets/phpmyadmin.conf
Paste the below code

    location /phpmyadmin {
        root /usr/share/;
        index index.php index.html index.htm;
        location ~ ^/phpmyadmin/(.+\.php)$ {
            try_files $uri =404;
            root /usr/share/;
            fastcgi_pass unix:/run/php/php7.2-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi_params;
        }

        location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
            root /usr/share/;
        }
    }

Ctrl+X to save and exit

Edit the nginx host file which is used by the ERP-Next using nano. The file is available on /var/nginx/sites-available (please make sure you use the correct conf file… Please find the correct virtual host file first)

Paste the below code inside the server { session

include snippets/phpmyadmin.conf; #this is the file just created above

Save the and exit.

Reload the nginx

sudo service nginx reload
2 Likes

Thank you, I will retry using this.

I had written a long rant/explanation about how I still could not get this working when I pasted the error below and figured it out… I did not have fpm installed. D/l’d that and all is well now - THANK YOU!

nging/error.log shows:
2020/06/04 00:51:36 [crit] 3568#3568: *1322 connect() to unix:/run/php/php7.2-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.20.191, server: site1.local, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "192.168.30.61"

Check version of php and update the same in nginx config :
/run/php/php7.2-fpm.sock

Thanks but perhaps I did’t respond well. I got it working but the fix was found while I was originally responding that I did not fix it… While pasting the error message I realized that I did not even have fpm installed.

do you have the solution please !!!

I have same problem

1 Like

@Rebaz_Balisani
the solution is here: