Jump to content

MySQL Federated Error (Can't connect to host)

- - - - -

  • Please log in to reply
4 replies to this topic

#1
karabibe

karabibe

    Newbie

  • Members
  • Pip
  • 3 posts
i use xampp v1.6.8

setup:
local ip : 192.168.5.25
remote ip : 192.168.5.6

I tried to practice from this source:
MySQL :: MySQL 5.0 Reference Manual :: 13.7.2 How to Use FEDERATED Tables.
I created two tables like the instructions.

on a remote server:
CREATE TABLE test_table (

id INT (20) NOT NULL AUTO_INCREMENT,

name VARCHAR (32) NOT NULL DEFAULT'',

other INT (20) NOT NULL DEFAULT '0 ',

PRIMARY KEY (id),

INDEX name (name),

INDEX other_key (other)

)

ENGINE = MyISAM

DEFAULT charset = latin1;

on the local server:
CREATE TABLE federated_table (

id INT (20) NOT NULL AUTO_INCREMENT,

name VARCHAR (32) NOT NULL DEFAULT'',

other INT (20) NOT NULL DEFAULT '0 ',

PRIMARY KEY (id),

INDEX name (name),

INDEX other_key (other)

)

ENGINE = Federated

DEFAULT charset = latin1

CONNECTION = 'mysql://root@192.168.5.6:9306/federated/test_table';

but after the command is executed an error occurs: Unable to the connect to foreign data source:
Can not the connect to MySQL server on '192 .168.5.6 '(10 061)

(2921 sec)

what is wrong and what's the solution?
thank you

Edited by Roger, 06 December 2010 - 07:23 PM.
added code tag


#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Are you sure port 9306 is opened by your firewall(s) / hosts files?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
karabibe

karabibe

    Newbie

  • Members
  • Pip
  • 3 posts
how do I check whether port 9306 is blocked or not?

sorry because I am a newbie

#4
karabibe

karabibe

    Newbie

  • Members
  • Pip
  • 3 posts
I've changed the port to 3012 but still can not. what's the solution?

#5
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts
Beside possible firewall problem. Check that you can access MySQL server from 192.168.5.6. In default installation, only users from localhost allowed to access MySQL server. So you need to add users from other location to "allowed" list first.

If it is problem with firewall, looks like you need to adjust local firewall either in 192.168.5.25 or 192.168.5.6 (since it looks like they both in the same subnet, there is no chance other firewall involved). Open control panel, System & Security, and find Windows Firewall (assuming you haven't modified the default firewall). There adjust the allowed application or port.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users