I have a server machine that is running SUSE Linux Enterprise Server 11. I set up a mysql server there. Now I want to access this mysql server from my laptop. I used the following command,
> mysql -h 12.246.5.70 -u davidehs -p
I found if the firewall on the server machine is running, I can not connect the mysql server from my laptop. If I stop the firewall first, and the do the connection, I can access the mysql. Do you guys have any idea how to keep the firewall running and allow the remote mysql incoming requests?
MySQL uses, by default, TCP 3306. It may have an option in the Firewall
configuration section of Yast as well to simplify things but otherwise go
to Advanced: TCP and type in 3306.
sudo /sbin/yast firewall
Good luck.
On 05/31/2011 12:36 PM, davidehs wrote:
>
> Hi,
>
> I have a server machine that is running SUSE Linux Enterprise Server
> 11. I set up a mysql server there. Now I want to access this mysql
> server from my laptop. I used the following command,
>
>> mysql -h 12.246.5.70 -u davidehs -p
>
> I found if the firewall on the server machine is running, I can not
> connect the mysql server from my laptop. If I stop the firewall first,
> and the do the connection, I can access the mysql. Do you guys have any
> idea how to keep the firewall running and allow the remote mysql
> incoming requests?
>
> Any comments and suggestions are appreciated.
>
> Thanks a lot.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
While the above advice seems sound enough to me, it may be to the point to tell you that we are an openSUSE forums and not a SLES/SLED forums. Sometimes people won’t see that you use SLED/SLES (they even may not even know what it is) and thus give you wrong advice.
As long as you are doing this within a LAN you are fine. But when this is an internet connection (firewall port 3306 TCP is opened on the EXTERNAL device) this may be a security leak. In this case you may consider to close the firewall for port 3306 and connect over an SSH tunnel.