# Squid not allowing connection to MySQL on port 3306



## hazee (Dec 4, 2012)

I can not connect to MySQL database using VB.Net application, over a remote user connection. I am to browse http and https without any issue but none of the other safe ports are available for communication. Though I am able to connect without the proxy server. MySQL remote connections are established on port number 3306.

Below is the squid.config file; ( I have given an extra space in 'c:' and '\' )

#Modified by Hazee Dec 04 2012
http_port 8080
cache_mgr [email protected]
visible_hostname proxy.xxx.xxx
hierarchy_stoplist cgi-bin ?
cache_mem 64 MB
cache_dir ufs c: /Squid/cache01 1000 16 256
cache_dir ufs c: /Squid/cache02 1000 16 256
cache_dir ufs c: /Squid/cache03 1000 16 256
cache_access_log c: /Squid/var/logs/access.log
cache_log c: /Squid/var/logs/cache.log
cache_store_log c: /Squid/var/logs/store.log
mime_table c: /Squid/etc/mime.conf
pid_filename c: /Squid/var/logs/squid.pid
ftp_user [email protected]
diskd_program c: /Squid/libexec/diskd.exe
unlinkd_program c: /Squid/libexec/unlinkd.exe
logfile_daemon c: /squid/libexec/logfile-daemon.exe
cache_store_log none
forwarded_for off
via off
httpd_suppress_version_string on
uri_whitespace strip

maximum_object_size 4194240 KB
maximum_object_size_in_memory 1024 KB

#redirect_program c: /usr/local/squidGuard/squidGuard.exe

#authenication with Windows server
auth_param ntlm program c: /squid/libexec/mswin_ntlm_auth.exe
auth_param ntlm children 5

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl allowed_hosts src 201.1.1.0/255.255.255.0
#acl localnet proxy_auth REQUIRED src 200.1.1.0/255.255.255.0
#acl localnet proxy_auth REQUIRED src 192.168.0.0/255.255.0.0


#Limit upload to 2M and download to 3M
request_body_max_size 2048 KB
reply_body_max_size 5000000 allow all

# default refresh patterns
refresh_pattern ^ftp: 1440 20% 10080 
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 

#ACL to define ports allowed to pass through Squid
acl Safe_ports port 80
acl Safe_ports port 21 
acl Safe_ports port 3306 
acl Safe_ports port 443 
acl Safe_ports port 9003 
acl Safe_ports port 9005 
acl Safe_ports port 9006 
acl Safe_ports port 9999 
acl Safe_ports port 1080 
acl SSL_ports port 443

acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access allow Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow gud_sites
http_access allow localhost
http_access allow allowed_hosts
#http_access deny all
acl gud_sites dstdomain .facebook.com

always_direct allow all

icon_directory c: /Squid/share/icons
error_directory c: /Squid/share/errors/English
coredump_dir c: Squid


----------

