简体   繁体   中英

Connecting to remote MySQL database from local LAMP through a university proxy

I have LAMP set up on my laptop for working on a web app for a project at university.

If I have the web app connect to a local MySQL database, all is fine and the app connects to the database.

However, if I specify a remote database, the app will load for a while before displaying this error:

Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2003): Can't connect to MySQL server on '176.32.230.14' (110) in /home/ben/site/inc/db.php on line 2
Connect Error (2003) Can't connect to MySQL server on '176.32.230.14' (110)

and stops at this section of code:

if ($mysqli->connect_error) {
    die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);
}

The remote database connection only fails when I am at my university connected to the WiFi and proxy.

I believe the proxy is the likely cause for my problem.

So, do I need to set up Apache to some how connect to the proxy?

嘿,听起来好像您可能无法通过mysql端口(3306)连接。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM