資料庫被黑了,淦
檢視MySQL的訪問IP許可權
# 進入mysql
docker exec -it mysql /bin/bash
mysql -u root -p
# 設定本地IP才可以訪問127.0.0.1改為本地公網IP
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'root'
# 重新整理許可權
flush privileges;
exit
docker restart mysql
檢視MySQL的訪問IP許可權
# 進入mysql
docker exec -it mysql /bin/bash
mysql -u root -p
# 設定本地IP才可以訪問127.0.0.1改為本地公網IP
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'root'
# 重新整理許可權
flush privileges;
exit
docker restart mysql