sudo mysql_secure_installation
返回結果如下:
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No: y
There are three levels of password validation policy:
LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0
** 學習用,簡單設置 12345678
後續一路 y
8、安裝 phpmyadmin
** 我是按照ubuntu 18.04 官網操作的,但是,她主要針對得失 apache2
** 這次沒有安裝 apache2,所以,中途注意不要讓它自動配置
** 拿不準的話,直接去下載 phpmyadmin 然後,按照 nginx 網站去配置
sudo apt install phpmyadmin
** 注意:Web 自動選擇: apache ,lightd 一個都不選!
摘錄一部分安裝提示如下
...
should most likely be provided in /usr/share/doc/phpmyadmin.
...
Creating config file /etc/phpmyadmin/config-db.php with new version
...
收到以上提示信息影響,第一次我給配置到了 phpmyadmin 文檔,也紀錄一下
cd /usr/share/doc/phpmyadmin
ls
changelog.Debian.gz copyright html README TODO.Debian
CONTRIBUTING.md examples NEWS.Debian.gz README.Debian.gz
本地先測試
curl 127.0.0.1:999
出現403 錯誤
403 Forbidden
據說是首頁沒有加上 index.php
curl 127.0.0.1:999/index.php
ok!說明 403確實是因爲:首頁沒有加上 index.php
瀏覽器測試
http://192.168.1.191:999
出錯誤了:
403 Forbidden
加上 php文件路徑
http://192.168.1.191:999/index.php
原因同上!
修改之後再來!
vim /etc/nginx/sites-availablephpmyadmin
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;