Remote Access to MySQL on Fedora

posted in: Linux 0

A recent project which involved working with MySQL Workbench and accessing a MySQL database on a Fedora 14 computer has proven to be a challenge in getting the connection established. Besides receiving rather meaningless errors

Error connecting SSH tunnel: Could not open socket to *addr*
-or-
Can't connect to MySQL server on 127.0.0.1 (10061)

which may be a result of my not knowing how to read them – there was nothing to indicate what was causing the problem.

I added the following to the /etc/sysconfig/iptables

 -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

but the connection still failed.

I finally found a clue when I tried to connect locally to a Fedora system and saw security message pop up on the Fedora box. Of course I did not write it down, but it pointed me to the setting for SELinux Management. Going to System/Administration/SELinux Management on the Fedora computer hosting MySQL, I started looking at the ssh options under the Boolean selection menu. I turned on the

 allow sshd to forward port connections

and that was all it took.

I am unsure what security holes this opens, but it allows Workbench to connect and that helps me manage the remote database.

Comments are closed.