sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
“DirectoryIndex index.php” aşagısına aşagıdaki kodu ekleyin
AllowOverride All
sudo nano /usr/share/phpmyadmin/.htaccess
AuthType Basic
Authname “Restricted files”
AuthUserFile /etc/phpmyadmin/.htpasswd
Require valid-user
sudo apt-get install apache2-utils
sudo htpasswd -c /etc/phpmyadmin/.htpasswd kullaniciadi
şifrenizi girin
sudo service apache2 restart