In this Golang Web Development Series #17, after the successful installation of the MySQL Server version 8, we will then proceed to install the phpMyAdmin version 5.0.4 with Nginx on Ubuntu 20.04 LTS server with step by step guide here in Golang's Web Development Series.
#MaharlikansCode
#GolangWebDevelopment17
#InstallphpMyAdmin
#Nginx
#Ubuntu2004LTS
#GolangTutorial
#LearnGolangWebDevelopment
#Golang
#LifeAsSoftwareDeveloper
#Maharlikans
#FilipinoSoftwareDeveloper
Get Linode Account:
https://www.linode.com/?r=6aae17162e9...
If you go with extra mile for buying me a cup of coffee, I appreciate it guys: https://ko-fi.com/maharlikanscode
Installation Guides:
Step 1: Get the latest phpMyAdmin's official site: https://www.phpmyadmin.net/downloads/
Change the 5.0.4 with the latest version for phpMyAdmin:
wget https://files.phpmyadmin.net/phpMyAdm...
unzip phpMyAdmin-5.0.4-all-languages.zip
mv phpMyAdmin-5.0.4-all-languages /usr/share/phpmyadmin
Step 2: Create tmp directory with proper folder permissions:
mkdir /usr/share/phpmyadmin/tmp
chown -R www-data:www-data /usr/share/phpmyadmin
chmod 777 /usr/share/phpmyadmin/tmp
CREATE A SYMBOLIC LINK FOR phpMyAdmin:
sudo ln -s /usr/share/phpmyadmin /var/www/html/your_domain_name.com/public_html/phpmyadmin
Step 3: Install PHP 7.4 (or specify the latest version) on Ubuntu 20.04 LTS:
sudo apt update
sudo apt install php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
php --version
Step 4: Configure the Nginx FastCGI to use the latest php7.4-fpm.sock, replace php7.
Enable the Nginx FastCGI with these options:
pass PHP scripts to FastCGI server
location ~ \.php$ {
include snippets/fastcgi-php.conf;
With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
With php-cgi (or other tcp sockets):
fastcgi_pass 127.0.0.1:9000;
}
Create a new location for phpmyadmin URL from Nginx server:
location /phpmyadmin/ {
alias /var/www/html/your_domain_name.com/public_html/phpmyadmin/;
}
Step 5: Restart the Nginx server:
sudo nginx -s reload
Step 6: Ensure that the root@localhost have the rights to access the phpMyAdmin:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_root_password_here';
GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on . TO 'root'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' WITH GRANT OPTION;
Step 7: Change the default port number for the apache2 instead of port 80, change it to 8079 or any other port number:
sudo systemctl start apache2
sudo systemctl status apache2
sudo service apache2 restart
If you received an error like this:
The configuration file now needs a secret passphrase (blowfish_secret)
Step 1: Look for these files:
/usr/share/phpmyadmin/config.sample.inc.php
/usr/share/phpmyadmin/libraries/config.default.php
Step 2: Must have this sample data, the default value is an empty strings, so must supply this 'blowfish_secret' value:
$cfg['blowfish_secret'] = 'MI;]UUpSZD7;Qi8q2jXRUoyhhQ79yvQT';