Software

Ubuntu Apache + SSL

//啟動 SSL 模組 sudo a2enmod ssl //產生私密金鑰 (Private Key) openssl genrsa -out server.key 2048 //產生憑證申請檔 (Certificate Signing Request) openssl req -new -key ./server.key -out server.csr // 國碼 Country Name (2 letter code) [AU]:TW //國名 State or Province Name (full name) [Some-State]:Taiwan //城市名 Locality Name (eg, city) []:Taipei //組織名稱 Organization Name (eg, company) [Internet Widgits Pty …

Continue Reading
Software

使用 MYSQL8.0 後 phpMyAdmin 無法登入

因為某些需求直接就安裝了 Mysql 8 沒想到一裝上去後 phpMyAdmin 就不能使用了,一直出現無法登入 但是使用 CLI 卻可以登入,所以就排除了密碼的問題 後來查到原來是 MySQL 8 預設的密碼驗證方式改成了sha256 而目前 PHP 的 pdo和mysqli 似乎還不支援,所以要改回舊的驗證方式 修正方式只要修改 my.ini 就可以了 default_authentication_plugin=caching_sha2_password #如果有看到這行就改成 default_authentication_plugin=mysql_native_password #然後重新啟動服務 基本上這樣就沒問題了,但是後來發現還是不行 推測應該是一開始建立的時候使用到了預設的sha256 所以使用 CLI 登入 MySQL 後再修改一次密碼就可以了 ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘yourpassword’; FLUSH PRIVILEGES;

Continue Reading