I found similar questions but none of them helped me with a windows machine.
I was able to connect to mySQL through my local machine. However, I have placed MySQL on a remote machine and when I try to connect to it, I get the following error:
Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Im using SQL workbench to connect. I use the remote machine's actual name for the hostname and using port 139. I have MySQL started up as a service on the remote machine as well. When googling the error I get lots of jazz about editing a file in /etc/hosts.allow and my.cnf and whatnot. However, these locations were specified for linux machines. I have a windows 7 machine for both my local and the remote machine and therefore do not have these locations.
Any help would be greatly appreciated.
I am not going to pretend that I know what caused this problem but it could be:
1.That you need to add
AllowTcpForwarding yes
to this file: /etc/ssh/sshd_config. Obviously since you are on windows you need to find its equivalent because that's a linux filepath.
2.It could be your firewall. Try temporarily disabling it (if it is safe to do so) and see if it works. If this is the case you will need to grant MySQL access through the firewall.
3.Try writing
mysqld: ALL: allow
In the file /etc/hosts.allow again since you are on windows you need to find its equivalent because that's a linux filepath. Now this may kind of be a security whole in some ways but who cares about security when you don't have a running server?
4.Now the last this is to check /etc/hosts.deny your IP might be there denying you access to your server.
Figured it out. 'root' was pointing to the root of the local machine and the root user on the remote machine was pointing to itself. So I had it connect to an admin user and it connected fine with no errors. Thanks for for the responses and help guys.