1
我使用laravel 5實現API中子域例如安全原因:api.domain.comSQLSTATE [HY000] [2002]遠程端口3306上建立TCP連接已禁用
我將laravel從本地複製到共享主機。在public_html/api文件夾中。
在當地eveything工作正常,但在服務器我得到這個錯誤:
PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] Establishing tcp connections on remote port 3306 has been disabled for security reasons.
當我試圖通過laravel 5
連接數據庫時我該怎麼辦?
那麼在創建PDO連接時使用另一個端口?顯示您用於創建PDO連接的代碼.. – Naruto
檢查您的數據庫配置,並與您的主機通話。 – aynber
@Naruto沒有我不使用另一個連接使用PDO,因爲我提到我的代碼在本地工作正常。 –