#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
#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
今天安裝WSL2 LAMP時終於把以前發生過的問題解決了,紀錄一下。
如果你安裝PHPMYADMIN顯示 mysqli_real_connect(): (HY000/2002): Permission denied
可以到 /etc/phpmyadmin/config-db.php 將 $dbserver='localhost'; 更改成 $dbserver='127.0.0.1';
這樣就可以成功登入了。
今天安裝phpMyAdmin於Ubuntu中,
但設定MySQL server密碼時卻老是顯示:
Since password will be sent to server in plain text, use ssl connection to ensure password safety.
Warning (Code 1287): 'SET PASSWORD = PASSWORD('<plaintext_password>')' is deprecated and will be removed in a future release. Please use SET PASSWORD = '<plaintext_password>' instead
SET PASSWORD has no significance for user 'root'@'localhost' as authentication plugin does not support it.
等訊息。
解決方法:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mypasswordhere';
參考資料: https://stackoverflow.com/questions/47099351/mysql-5-7-20-unable-to-set-root-password