Remote MySQL connection problems

Discussion in 'Installation/Configuration' started by The General, Nov 6, 2009.

  1. The General

    The General New Member

    Hi Guys,

    Here is a tester for you :)

    I have a fresh ispconfig 3 install in a DMZ (ORANGE) with all ports required open and pointing directly to the ISPConfig server at my house.

    I have written a program in visual basic to connect to a database on this server but i keep getting this error message when trying a connection using this program from a friends house.

    "Cannot connect to database: Unable to connect to any of the specified MySQL hosts."

    The Basics,
    MySQL has been stopped and started
    Port 3306 TCP is forwarded from my smoothwall box to the server in the DMZ
    Remote Access is enabled for this database
    My User name has been entered with the correct "client prefix" I.E "c1testuser"

    Now, this is the stinger !

    If i try to connect to this database from my "GREEN" subnet using this program at my house i get a connection using the servers 192.168.1.*** I.P Address.It seems any access to MySQL from the internet is resulting in no connection, and the error message above in blue! By the way he has also already installed on his pc the MySQL.DATA.DLL files for the connection.

    I Also get the same error when replacing the 'local' IP address to my ISP static address from at my house. which is a pain if you program and use connection strings!!!!!!!

    Any Ideas will be COOOL!
     
  2. Doug G

    Doug G Member HowtoForge Supporter

    Something in your firewall or router must be blocking port 3306. Did you check that port 3306 is open in the ispconfig firewall?
     
  3. The General

    The General New Member

    tcp 3306 is forwarded from the smoothwall firewall to server
    udp 3306 is forwarded from the smoothwall firewall to the server

    ISPConfig firewall says that 3306 TCP & UDP are unblocked
    am i missing something or is there any other port that should be open for this ?


    i am going to reinstall smoothwall (the firewall), and see if that makes a differance. i will report back

    Thanks

    Bill
     
    Last edited: Nov 7, 2009
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Also make sure that you configured mysql to isten on all IP addresses and not just 127.0.0.1 in the my.cnf file.

    You can check it with:

    netstat -tap | grep mysql
     
  5. The General

    The General New Member

    User error !

    My friend said "HE IS A NUMPTY" !!!

    i thought my instructions were faultless to him on installing and using the mysql port test programme but obviously not !

    When inputting the user name for the database he has been inserting "CL******" as a client prefix not "C1******" He has and i will appologise for waisting time on this forum and it just goes to prove that maybe we should pay a little more attention to what we are doing and not automaticly think it's an error with ISPConfig or a LINUX distro

    Thanks and appologies again
     

Share This Page