Hello. I installed LAMP on my system very quickly and easily. :). Now i need help with installing PHPMYADMIN. Can anybody help me please? Thanks in advance.

Hope this helps


Hi @StarTreker

Unfortunately, I do not understand what to do after reading the document you sent me. I am coming from windows and only started using linux (Zorin os 16) few days now.

I will keep on searching but thank you very much for your help.


I recently installed php-myadmin to our local WordPress server.

I will copy and paste the memo I wrote at that time:

How to install phpMyAdmin

$ sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl

This will gives an error message:

To resolve this, follow the last instruction on this page (temporarily removing the root password)

Log into mysql

$ mysql -uroot -p

SET PASSWORD FOR root@localhost=PASSWORD(''); <<--- to remove the root password.

Re-install phpmyadmin

sudo apt install phpmyadmin

Once that is done, run
$ mysql_secure_installation <<-- to set a root password again. (your password here)

The version of phpMyAdmin from repository is outdated and not compatible with the current PHP.
To fix that, manually update phpMyAdmin.

$ sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

$ sudo mkdir /usr/share/phpmyadmin/

$ cd /usr/share/phpmyadmin/

$ sudo wget

$ sudo tar xzf phpMyAdmin-5.1.0-all-languages.tar.gz

move content of the folder

$ sudo mv phpMyAdmin-5.1.0-all-languages/* /usr/share/phpmyadmin

access (yours server IP)/phpmyadmin

there will be 2 error messages


$ sudo nano /usr/share/phpmyadmin/libraries/vendor_config.php

  1. Press CTRL + W and search for TEMP_DIR

Change line to

define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');

  1. Press CTRL + W and search for CONFIG_DIR

Change line to

define('CONFIG_DIR', '/etc/phpmyadmin/');

for clean up:

$ sudo rm /usr/share/phpmyadmin/phpMyAdmin-5.1.0-all-languages.tar.gz

$ sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-5.1.0-all-languages

$ sudo rm -rf /usr/share/phpmyadmin.bak

1 Like

That is a lot of steps...:neutral_face:

The problem is that the maintainer of Phpmyadmin is not updating anything for some years and there is no one to take over that position.
Such is the peril of PPA.

1 Like

WOW. Thank you very much @StarTreker

1 Like

and @FrenchPress

Did you managed to install?
I know it is rather complicated but that what would happen when PPA is not maintained and there is no .deb installer.

1 Like

Well then your screwed :joy:

i will try it soon. lol

1 Like

I tried to follow the steps but it failed at these lines...

$ sudo wget

it said:

HTTP request sent, awaiting response... 404 Not Found
ERROR 404: Not Found

$ sudo tar xzf phpMyAdmin-5.1.0-all-languages.tar.gz

It said:

Cannot open: No such file or directory


The command is working for me.
I just tried it.
Make sure you omit $ at the begging of the command.

Just in case you need:

sudo apt install wget

But you can also just click the link and it will offer a download:

1 Like

Hello guys,

I finally got phpmyadmin to work. problem was i needed to enter phpMyAdmin instead of phpmyadmin. Coming from a windows background, i did not realize it was so important.

Anyways, got it to work BUT i cannot enter phpmyadmin with root username. I changed root username's password and it works in the linux terminal but it does not work in phpmyadmin page.

Can anyone help me with this?

Thank you so much in advance guys.

@StarTreker @FrenchPress @Aravisian

1 Like

I only know how to change the mysql or phpadmin password if you already are able to log in using it.
You must log in, then change the password.
mysql -u root mysql

There are three separate passwords involved in WordPress server.

  1. Linux login password
  2. mysql password
  3. phpmyadmin password

Make sure you set them properly.

In case you forget phpmyadmin password:

See the first answer. You need to stop mysql server before resetting phpmyadmin password.

This is what i get...


I also get the error message with the above command albeit it is of a different kind.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

But my server is functioning.
Did you check the link I posted above?

why not installing xampp ?