PHP Warning: mysql_connect(): Connection timed
#7

Quote:
Originally Posted by Slawiii
Посмотреть сообщение
i got same your problem when i have a linux host
i don't know why MySQL hosted in a linux can be connected only with localhost
if you want to make it working search for a windows hosting or search for a host support MySQL + Web Hosting

For me, i sloved this problem by registering in this website mywindowshosting.com
this website giving free web hosting windows for 2 months. when you register create a database and save the info of host
This has nothing to do with the OS. Server providers and VPS users alike usually block remote connections from a security point of view. Only the essential ports are opened and the rest are securely closed. Admittedly, if you have a VPS you can whitelist certain IP addresses/ranges, while implicitly blacklisting all the rest.

And a word of caution: the "mysql" PHP extension is deprecated and has been completely removed from PHP 7 onwards. Use PDO or mysqli instead.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)