Connect to MySQL from another host

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Connect to MySQL from another host

Postby Koala » 30. November 2011 00:47

Hello,

I have installed XAMPP(v1.7) in a Windows XP Pro SP3(x86) PC. Everything running and working great. But now I have a website hosted in another computer(outside my network) that needs to communicate with a database hosted in my computer where XAMPP is installed.

I've been reading about it and tried different "solutions" but none of them worked. Maybe I'm just missing something obvious but can't find out what..

So what I have so far is:

  • MySQL user with GRANT, All privileges and Host % for the database in request.
  • MySQL Port 3306 open/forwarded on router.
  • Firewall exceptions for port 3306 as well(even firewall off).
  • my.cnf as follows:
    Code: Select all
    # The MySQL server
    [mysqld]
    port= 3306
    socket= "C:/xampp/mysql/mysql.sock"
    basedir="C:/xampp/mysql"
    tmpdir="C:/xampp/tmp"
    datadir="C:/xampp/mysql/data"
    skip-locking
    key_buffer = 16M
    max_allowed_packet = 1M
    table_cache = 64
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M



    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (via the "enable-named-pipe" option) will render mysqld useless!
    #
    # commented in by lampp security
    #skip-networking
    skip-federated

    Tried these on the my.cnf:
  • bind-address=TheIPOfTheWebsiteHost but then MySQL doesn't start. Well it does but then it shuts down itself.
  • bind-address=0.0.0.0
  • socket= "TCP/IP"
None of them worked.

At the beginning I wasn't able to connect from a computer on my network but it got fixed when I open/forwarded port 3306 on the router. But from outside my network the problem still.

Any ideas?

Thanks in advance.
User avatar
Koala
 
Posts: 8
Joined: 21. November 2011 23:59
Operating System: Windows XP Pro SP3

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 202 guests