We help IT Professionals succeed at work.

MySQL 5.1 - Cannot connect to mysql from remote server

780 Views
Last Modified: 2012-05-09
Hello everybody,

trying to connet to my mysql server 5.1 from a remote machine without any luck.
netstat -an tells me:
TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING

I can connect via:
telnet localhost 3306

but not with:
telnet serverip 3306

Local Firewall is off, also DEP.
OS MS Windows Server 2008 x64
Here is my Config-File:
[client]
port=3306
[mysql]
default-character-set=latin1
[mysqld]
port = 3306
basedir="C:/Program Files/MySQL/MySQL Server 5.1/"
datadir="C:/ProgramData/MySQL/MySQL Server 5.1/Data/"
default-character-set=latin1
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=160
query_cache_size=200M
table_cache=320
tmp_table_size=204M
thread_cache_size=8
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=336M
key_buffer_size=32M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_data_home_dir="D:/mySQL/data/"
innodb_additional_mem_pool_size=24M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=12M
innodb_buffer_pool_size=1154M
innodb_log_file_size=231M
innodb_thread_concurrency=8

Also tried with following options but it doesnt help either.
enable-named-pipe
skip-name-resolve
bind-address=serverip   <== But then i can't connect to my sqlserver in any way.

Any help would be appreciated !!!! I don't know how to resolve that issue....

Kindly Regards
birgos
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Check whether the system has a hardware firewall in front of it enabled and if so does not have an exception to allow a connection in.
The other item you have to check is whether you've configured users that are permitted to connected from external hosts.
What are the first and last octet of the IPs on each system please include the netmask?

Author

Commented:
Hello arnold,

i already disabled every firewall system that belongs to that server. Hardwarefirewall as Windows Firewall. I can reach all other ports like smtp, ftp, http, https and so on.

Author

Commented:
Damn, send it too early.
I configured an root user for connection from %.
IP Adresses are:
82.x.x.82
87.x.x.129
But like i wrote earlier, i can reach all other ports of services i configured....

Author

Commented:
I partially found the reason.
I tried to activate an ssh server on the machine but got the same problems.
Now I started the ssh server and the mysql server (one after the other) on port 21 (FTP Server already works!) and whohooo i can connect from outside to that services.

So Windows Server 2008 must have a new feature like paket filtering, because i turned software firewall completly OFF!!! But i didn't found the right mmc for this naughty thing...

Later more...
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
can you on the server connect to IP 3306
i.e. if the server has an ip 192.168.0.5 can you on the server establish a connection to port 3306
telnet 192.168.0.5 3306?

Do you have port forwarding for 3306 setup on the router if the IPs on the server are not of the 82.x.x.x.82 or 87.x.x.129?

Author

Commented:
Negative. I can't connect to port wether from outside than locally on the server.
And I don't need port forwarding. Ports that are needed are already open in the firewall. Like i wrote before I know the problem now. There is a paket filtering mechanism in 2008 that blocks the traffic. I just don't find a setting yet to disable it. Stopping the service doesn't had a positive effect. Now I'm searching the Net for informations about this new feature....
Found this so far:
http://technet.microsoft.com/en-us/library/bb726965.aspx
http://social.msdn.microsoft.com/Forums/en-US/wfp/thread/774026e6-a771-418a-b531-22183ef399f8
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
See if the following link guides you to a resource where you can alter this.
http://technet.microsoft.com/en-us/library/dd469754%28WS.10%29.aspx

Use GPMC to make sure that these restrictions are not being set through GPO or GP preferences.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.