Connecting to MySQL over a network? How?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coolsti
    Contributor
    • Mar 2008
    • 310

    Connecting to MySQL over a network? How?

    What I actually really want to do is to access my MySQL database running on Linux from C# programs running on Windows on the same network.

    As a first step, I am simply trying to connect to my MySQL database on Linux computer A from another Linux computer B using the mysql console program from a shell window like this:

    mysql -h 10.0.1.130 -u username

    The IP address of the computer A is 10.0.1.130. For some reason I seem to be missing something in the configuration because I get this error:

    ERROR 2003 (HY000): Can't connect to MySQL server on '10.0.1.130' (113)

    Can someone point me in the right direction?

    Note that I do not wish to use something like phpadmin; the point of this excersize is to be able to write Windows applications to access the database to display certain views to users.

    Many thanks!
  • coolsti
    Contributor
    • Mar 2008
    • 310

    #2
    Never mind, I solved the problem :)

    It was the firewall on the Linux PC hosting the database that was blocking any attempts to connect.

    After fixing up the firewall, I now can connect, both from my other Linux machine as well as from a C# program running on a Windows machine.

    Next I need to figure out how to manipulate images ......

    :)

    Comment

    Working...