Remote MySQL Server connection w/PHP -


i need connect external mysql database , fetch data. have few concerns it:

  1. connecting remote server increase loading time of page, want lowest possible.
  2. the data need load extra, if remote server appears down don't want wait time (until times out).

what best practices on connecting remote mysql database using php? basically, want website loading time affected smallest possible.

if can't done php, i'm open different approach.

if possible, build api 1 end has local access database, , api consumer @ remote. can institute time-out on api fetch call. writing simple json-type wrapper around database not difficult.

the alternatives messy, such vpn, ssh bridge, or remote access mysql port using ssl/tls encryption. database driver struggle when have unreliable connection, or 1 suffers packet loss. performance erratic @ best.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -