# Install phpMyAdmin

Let’s begin by updating the package lists and installing phpMyAdmin for Nginx on Ubuntu 20.04 / 20.10.

```
sudo apt update && sudo apt install phpmyadmin
```

Press `Y` and `ENTER` to continue the installation phpMyAdmin package.

### Select Nothing

If you are prompted to choose a web server like below, as there is no option for Nginx, press `TAB` and then `ENTER` to continue without selecting a web server.

![](/files/-Mgj1Fl-0GZDmUZWzr2d)

### Configure Database

Select `Yes` and press `ENTER` to install and configure the database.

![](/files/-Mgj1SP53cadNay40mLu)

### Application Password

The MySQL application password is used internally by phpMyAdmin to communicate with MySQL and it is not recommended that you use it to log into phpMyAdmin. You can leave this blank and a password will be generated automatically.&#x20;

Press `ENTER` to continue or you've entered your password press `Ok` then enter again for password confimation.

![](/files/-Mgj1lS0QjhQ6U9Wzdvc)

Success install phpMyAdmin.

### Create Symbolic Link

In order for Nginx to serve the phpMyAdmin files correctly, we must create a symbolic link from the phpMyAdmin directory `/usr/share/phpmyadmin` to the Nginx document root directory.

The default location of the Nginx document root in Ubuntu 20.04 / 20.10 should be `/var/www/html/`, though it could be different depending on your setup. If you setting up multiple domains for Nginx, your document root may be located in somewhere like `/var/www/example.com/public_html`.

Once you have confirmed your document root, let’s create a symbolic link from the phpMyAdmin directory to your document root. Here we will assume your document root is `/var/www/html/` and we will simply add `phpmyadmin` to the end of it.&#x20;

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

### Test phpMyAdmin

You should now be able to access the phpMyAdmin web interface by visiting your server’s domain name or public IP address followed by `/phpmyadmin`. e.g. `http://example.com/phpmyadmin` or `http://Your_IP/phpmyadmin`.

![](/files/-Mgj3DspddhR8iFJzx6y)

If you enter the password at [Application Password](/install-nginx-mariadb-php-and-phpmyadmin/install-phpmyadmin.md#application-password) section you can log in using **phpmyadmin** as username and password that you enter early.

For user **root** you need to update the password.

{% hint style="success" %}
You've completed this section, try to login your phpMyAdmin.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://haqem.gitbook.io/install-nginx-mariadb-php-and-phpmyadmin/install-phpmyadmin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
