To install phpMyAdmin with Nginx on Ubuntu 22.04, you can follow these steps:
Step 1 : Update Package List:

Step 2 : Install phpMyAdmin:

During the installation, you will be prompted to choose a web server. Select none
since we will configure Nginx separately.

When prompted to configure the database for phpMyAdmin, choose dbconfig-common.

Create a MySQL application password for phpMyAdmin when prompted

Password confirmation:

Step 3 : Configure Nginx for phpMyAdmin:
Create a new Nginx server block configuration for phpMyAdmin. Create a new file:
Add the following configuration:

Replace phpmyadmin.your_domain
with your server's domain name.
Step 4 : Enable the phpMyAdmin Nginx Configuration:

Step 5 : Test Nginx Configuration:

If the configuration test is successful, reload Nginx:

Step 6 : Access phpMyAdmin:
Open your web browser and navigate to http://phpmyadmin.your_domain
. You should see the phpMyAdmin login page.

Log in with your MySQL/MariaDB credentials.

Remember to replace your_domain
with your actual domain.
You have successfully installed and configured phpMyAdmin with Nginx on Ubuntu 22.04.