dcsimg
Results 1 to 3 of 3

Thread: cannot connect to remote database

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Posts
    1

    cannot connect to remote database

    Hi all,
    I've installed MySQL on an old Win XP PC. I want users on our internal network to be able to connect to it from their PCs.

    However, when I try to connect to the remote PC (using HeidiSQL) I get the following message:
    SQL Error (2005): Unknown MySQL server host '/192.168.1.129' (11001)

    The IP address on the server is correct. I can connect locally on the server using HeidSQL.

    What do I need to do to connect to the remote PC?
    I don't have any tables on the remote. I've tried to connect as 'root' and as 'Skip' (a user I created).

    Thanks,

    Skip

  2. #2
    Join Date
    Apr 2011
    Location
    /ramdisk/
    Posts
    6
    1) put a hole in your firewall, it should be TCP. Alternatively you can use SSH to tunnel.

    2) port forward correctly if you're using a router

    3) You'll need a username and password rule written for the credentials you're connecting with. This will get you started:

    http://dev.mysql.com/doc/refman/5.0/en/grant.html
    http://dev.mysql.com/doc/refman/5.0/en/create-user.html

    But instead of making you read that long manual... You'll basically just need to look at the create user syntax and know:
    roughly the IP addr you're connecting from (writing a rule of % remote address seems odd to me), the username, and a strong password.


    Also... what is that slash in-front of your IP address? That should not be there.

  3. #3
    Join Date
    Apr 2011
    Location
    /ramdisk/
    Posts
    6
    My mistake... You ARE using a router:

    The first two octets (192.168.%.%) are for computers behind a router. You will need to port forward the mysql port for your mysqld process (probably 3301 or something like that) to your internal network and then you will be fine.

    It's probably something like this~

    1) go to http://192.168.2.1 (from behind your router)
    2) log in
    3) go to port forwarding
    4) enter a new rule for 3301 (or whatever port mysqld is listening on) and then have at it ^_^

    Cheers

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •