DataBase: Difference between revisions

From FlowerHouseWiki
Line 17: Line 17:
<p>Bash script to update phpMyAdmin:</p>
<p>Bash script to update phpMyAdmin:</p>
<syntaxhighlight lang="bash" line>
<syntaxhighlight lang="bash" line>
s
  GNU nano 5.4                                        UpdateMyAdmin.sh                                                 
#!/bin/bash
 
echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Which version do you want to update to?"
echo -e "-------------------------------------------------------------------------------------------"
 
read version
 
echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Update phpMyAdmin to version ${version}?"
echo -e "-------------------------------------------------------------------------------------------"
 
echo -e -n "Continue? [y/N]"
echo ""
read -n 1 c
 
if [ "${c}" != "y" ]; then
    exit 0
fi
 
wget https://files.phpmyadmin.net/phpMyAdmin/${version}/phpMyAdmin-${version}-all-languages.tar.gz || exit 1
tar xvf phpMyAdmin-${version}-all-languages.tar.gz || exit 1
rm phpMyAdmin-${version}-all-languages.tar.gz || exit 1
cp /usr/share/phpmyadmin/config.inc.php phpMyAdmin-${version}-all-languages/config.inc.php || exit 1
rm -r /usr/share/phpmyadmin/ || exit 1
mv phpMyAdmin-${version}-all-languages/ /usr/share/phpmyadmin/ || exit 1
 
echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Update to version ${version} completed!"
echo -e "-------------------------------------------------------------------------------------------"
</syntaxhighlight>
</syntaxhighlight>

Revision as of 23:31, 21 February 2022

Phpmyadmin.png

Network


IP: 192.168.88.13
MAC: F6:55:D0:3C:14:94
Domain: db.flowerhouse.at

System


OS: Debian Bullseye
RAM: 512MB
Cores: 1
Privileged: No

The DataBase-LXC is reachable under 192.168.88.13 which is located in the ServerVLAN.

The subdomain is db.flowerhouse.at which is handled by the ReverseProxy.

Basic Setup

Update Script

Bash script to update phpMyAdmin:

  GNU nano 5.4                                         UpdateMyAdmin.sh                                                  
#!/bin/bash

echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Which version do you want to update to?"
echo -e "-------------------------------------------------------------------------------------------"

read version

echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Update phpMyAdmin to version ${version}?"
echo -e "-------------------------------------------------------------------------------------------"

echo -e -n "Continue? [y/N]"
echo ""
read -n 1 c

if [ "${c}" != "y" ]; then
    exit 0
fi

wget https://files.phpmyadmin.net/phpMyAdmin/${version}/phpMyAdmin-${version}-all-languages.tar.gz || exit 1
tar xvf phpMyAdmin-${version}-all-languages.tar.gz || exit 1
rm phpMyAdmin-${version}-all-languages.tar.gz || exit 1
cp /usr/share/phpmyadmin/config.inc.php phpMyAdmin-${version}-all-languages/config.inc.php || exit 1
rm -r /usr/share/phpmyadmin/ || exit 1
mv phpMyAdmin-${version}-all-languages/ /usr/share/phpmyadmin/ || exit 1

echo -e "-------------------------------------------------------------------------------------------"
echo -e "- Update to version ${version} completed!"
echo -e "-------------------------------------------------------------------------------------------"