Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Linux SJA V2.0 localhost problem

forums forums SQLyog Sync tools, Migration, Scheduled Backup and Notifications Linux SJA V2.0 localhost problem

  • This topic is empty.
Viewing 8 reply threads
  • Author
    Posts
    • #8463
      JasonPotter
      Member

      Hi All,

      Could someone explian what sja does with the host name in the xml sync file. I am having issues with using localhost as the host name. To help debug this problem I have done the following and they all work ok:

      1) ping localhost

      2) mysql -h localhost -p

      3) used 127.0.0.1 in place of the string localhost in the xml file

      4) used 192.168.0.4 as the hostname

      5) mysqladmin -h localhost –port 3306 version -p

      Item 5 resulted in the following:

      Server Version 4.0.14-standard

      Protocol version 10

      Connection Localhost via UNIX socket

      UNIX socket /tmp/mysql.sock

      The hosts file has the following in it:

      127.0.0.1 localhost

      my.cnf is the following:

      [mysqld]

      datadir=/emadata/mysql

      socket=/tmp/mysql.sock

      [mysql.server]

      user=mysql

      basedir=/usr/local/mysql

      [safe_mysqld]

      err-log=/var/log/mysqld.log

      pid-file=/var/run/mysqld/mysqld.pid

      As soon as i put localhost in my xml file i get the error “Could not connect to SOURCE MySQL server” when i run the agent. The xml file was produced using windows version of sqlyog and have confirmed it runs correctly with the agent.

      Any ideas on what could be the problem or further ideas to help track down the problem.

      Thanks in advance

      Jason

    • #15929
      Shadow
      Member

      Perhaps you could check out the “Can't connect to [local] MySQL server Error” part of the manual. Hope, it helps!

    • #15930
      loskutak
      Member

      I got the same trouble on my Linux boxes.

      Temporary solved, that I am not using localhost.

      So I have two boxes running MySQL and third

      running SJA to make synchronisation jobs.

      This is work well for me, but is not a real solution.

      When I try to run SJA on the same host where is

      MySQL, the receive “Could not connect to SOURCE

      MySQL server” error message. Regardless I use localhost or real

      host name.

      This error message does not have a error number, so I assume,

      that is not a MySQL related error, but an sja error. So will be interesting

      to know, when this error can occurs.

      Checking manual was not helpfull. Permissions are OK,

      port is OK, MySQL is connectable via mysql from localhost

      as well as from outside. Job xml is also OK, because is

      working when moved to third box.

      If anyone already solved that, please let known.

      regards,

      Tomas

    • #15931
      thegimper
      Member

      I have the exact same problem, is there still no solution to this after 1 year? :huh:

      Btw using SJA 4.1

    • #15932
      peterlaursen
      Participant
      Quote:
      used 127.0.0.1 in place of the string localhost in the xml file

      worked for other user. Would not that be OK ?

      If it works for you too, it must be because of the way the OS resolves “localhost”.

      Maybe using socket and not tcp ?

      (I don't know much about Linux!)

    • #15933
      thegimper
      Member
      peterlaursen wrote on Aug 20 2005, 02:18 PM:
      worked for other user.  Would not that be OK ?

      If it works for you too, it must be because of the way the OS resolves “localhost”.

      Maybe using socket and not tcp ?

      (I don't know much about Linux!)

      [post=”6943″]<{POST_SNAPBACK}>[/post]

      I think what he means is that he have tried that but it did not work.

      For me it does not work with localhost, 127.0.0.1 or computername.

      Everything is ok with the mysql-server i have no problem connection to it with mysqladmin localy and no problems connection from external computers.

    • #15934
      peterlaursen
      Participant

      Well I understand Jason another waythen you then!

      I'll let Linux users take over here!

      Any Linux user here who CAN connect to localhost or 127.0.0.1 from the SJA ??

    • #15935
      dmspink
      Member

      Hi

      I had the same problem with sja when running on the same machine as the database. The cause is local domain resolution that causes a translation transforms:

      In your /etc/host file you will must likely have a line for localhost like below

      use will notice that it has a domain name, your might not be localdomain but ome other name

      127.0.0.1 localhost.localdomain localhost

      a lookup of 127.0.0.1 wil give localhost.localdomain

      a lookup of localhost will resove to local.localdomain

      You must not remove the localhost.localdomain as you will find internal mail and some other services will stop working.

      You can fix the problem by putting a new root user in mysql with the host set as localhost.%

      the % is a wildcard and wll match any domain name.

      and in the sja xml file change localhost to localhost.localdomain

      sja will now work

      Hope this help explain the problem.

    • #15936
      peterlaursen
      Participant

      Quite funny that I wrote this just a few days ago:

      http://www.webyog.com/faq/16_67_en.html

      Quote:
      a lookup of 127.0.0.1 wil give localhost.localdomain

      I believe it is the other way around! a lookup of localhost.localdomain will give 127.0.0.1!

      Why do you have “127.0.0.1 localhost.localdomain” in your hosts file when “127.0.0.1 localhost” will normally do? There need not be a “localhost” (actually it is often replaced with “build” on test servers) but there will always be a 127.0.0.1 when there is a TCP-protocol.

      But I agree that we have a hosts resolving issue here!

Viewing 8 reply threads
  • You must be logged in to reply to this topic.