#Remove nginx ;; 移除nginx
apt-get --purge remove nginx ; apt-get remove nginx-common ; apt-get remove nginx-core ; apt-get autoremove
#Install Apache2, PHP, MySQL ; ; 安裝Apache2, PHP, MySQL
apt-get install -y apache2 ; service apache2 start
apt-get install -y php php-mysql mysql-server ; service mysql start
apt-get install -y phpmyadmin (**Remember enter "space" to apache2 during install phpmyadmin ;; 安裝phpmyadmin記得對apache2按空白鍵)
#Set SQL Password and Permission ;; 設定SQL密碼和權限
mysql -u root
CREATE USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'temppwd';
--> if failed, try: CREATE USER 'root'@'%' IDENTIFIED BY 'temppwd';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
drop user 'root'@'localhost';
flush privileges;
exit
#Change Bind for MySQL ;; 更改MySQL監聽IP ( FOR GLOBAL IP TO ACCESS)
nano /etc/mysql/mysql.conf.d/mysqld.cnf
change text below ;; 更改下述文字
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
to -->
bind-address = 0.0.0.0
mysqlx-bind-address = 0.0.0.0