# 開發環境疑難雜症 ###### tags: `MariaDB` `開發環境` `PHP` [toc] ## 第三方軟體安裝 - [How to Fix “App Is Damaged and Can’t Be Opened” on Mac](https://www.howtogeek.com/803598/app-is-damaged-and-cant-be-opened/) ## Mariadb ### 因大量匯入資料產生過多 binlog - [PURGE BINARY LOGS](https://mariadb.com/kb/en/purge-binary-logs/) ### Error while reading greeting packet #### 錯誤訊息 > PHP、Nginx、MariaDB 等各個必要 services 確實有成功開起來,但部份前台頁面依然頻繁出現以下非預期錯誤訊息 ``` Severity: Warning Message: mysqli::real_connect(): Error while reading greeting packet. PID=16 Filename: mysqli/mysqli_driver.php Line Number: 211 ``` #### 嘗試的解法參考 - [Mysql server has gone away](https://www.codeproject.com/Questions/1195772/Mysql-server-has-gone-away) - [MySQL / MariaDB 修改資料插入上限 max_allowed_packet](https://www.ltsplus.com/mysql/mysqlmariadb-change-max_allowed_packet) (建議作法) ## PHP ### 版本切換 - [How To Switch PHP Version on Ubuntu 20.04 LTS](https://php.tutorials24x7.com/blog/how-to-switch-php-version-on-ubuntu-20-04-lts)