Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Remote mysql connection

  1. #1
    leslie is offline Member
    Join Date
    Jun 2006
    Posts
    12
    Rep Power
    9

    Default Remote mysql connection

    I am working on a towards integrating Zimbra with SugarCRM and have these two apps installed on 2 different machines (SUSE 9.3 and WinXP).
    I need to connect to the Zimbra databases (Linux) via a normal PHP mysql_connect function (WinXP), but it keeps telling me that 'Host 'xp.domain.com' is not allowed to connect to this MySQL server'.
    I have added the remote host (XP) to the 'users' and 'db' tables and granted privileges, but it still throws the same error each time.
    I would welcome any advice that would enable me to connect to the Zimbra database from my Windows machine!

  2. #2
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    You need to grant the host and the user.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    leslie is offline Member
    Join Date
    Jun 2006
    Posts
    12
    Rep Power
    9

    Default

    It appears that all remote connection requests are automatically sent to the default linux mysql server(installed with Linux) and not the zimbra mysql server('data store' installed with Zimbra).

    I have started MySQL 4.1.10a(installed with Linux), created a new user (with appropriate privileges) and logged on to this mysql account form my remote XP machine. This means that there is no problem connecting form my XP machine to the linux box.

    The problem is that I cant connect to the zimbra mysql (4.1.16-standard-log) server using the port specified in zimbra 'my.cnf' file(or any other way).
    All I get is a 'The server is not responding' error.

    Could you please help?

  4. #4
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    What port are you trying? I think our default is 7306. It may be the case the TCP connections are disabled and only local socket/pipe connections are allowed.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  5. #5
    leslie is offline Member
    Join Date
    Jun 2006
    Posts
    12
    Rep Power
    9

    Talking

    I am trying socket 7306 (nmap states that socket 7306 is closed with an unknown service).
    I am currently trying to either:
    1. Change the state of socket 7306 to 'open'
    2. or Change the Zimbra mysql socket to 3306 (open socket for the default linux mysql database).
    Thanks for your help. It is much appreciated!

  6. #6
    leslie is offline Member
    Join Date
    Jun 2006
    Posts
    12
    Rep Power
    9

    Post

    I cant open port 7306 and I cant change it either.

    I've disabled the firewall, enabled the firewall, allowed all the services I could find, set port 7306 to the list of allowed ports, tried, failed and disabled the firewall again (with a couple of re-boots thrown in for good measure).

    I tried changing the port in my.cnf to 3306 (after disabling mysql first), and then followed a procedure very similar to the one described above, all to no avail!

    any advice would be geatly appreciated

  7. #7
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    18

    Default

    Can you use the mysql cli client with a port option to verify that it's running on 7306? You don't want to move the Zimbra port as that may break Zimbra if you don't update all the references.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  8. #8
    leslie is offline Member
    Join Date
    Jun 2006
    Posts
    12
    Rep Power
    9

    Default

    I've modified the Linux my.cnf in /etc (for mysql running on port 3306) to point to the data files of the Zimbra data store. I can now access the Zimbra database remotely using port 3306, but zmcontrol now has trouble starting Tomcat and Zimbra mysql (on port 7306). If I can just somehow get both instances of mysql to access the same databases files through different ports simultaneously without killing each other...
    I currently can't access mysql at all through the normal 'zmcontrol' cli method using port 7306, but that might just be because of conflicting my.cnf files.
    I'll fix it up and try doing it ASAP.

  9. #9
    leslie is offline Member
    Join Date
    Jun 2006
    Posts
    12
    Rep Power
    9

    Default

    I can connect from the cli on the Zimbra box using ANY port once the services are running; "mysql -ulocalhost -P7306" connects just as well as "mysql -ulocalhost -P1".

    The funny thing is that I cant connect at all when I use anything other than 'localhost' as my host (as opposed to 127.0.0.1 or 123.123.123.1 (my static IP address) or zimbraServer.com).
    Could this somehow contribute to the problem?

    The following excerpt from 'mysqld.log' shows that port 7306 is being used by Zimbra:
    "060623 10:50:35 mysqld started
    060623 10:50:38 InnoDB: Started; log sequence number 0 151963
    /opt/zimbra/mysql/bin/mysqld: ready for connections.
    Version: '4.1.16-standard-log' socket: '/opt/zimbra/db/mysql.sock' port: 7306 MySQL Community Edition - Standard (GPL)"

  10. #10
    bburtin is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    78
    Rep Power
    9

    Default

    It's probably MySQL authentication silliness. By default, we only allow MySQL connections from localhost. Here are the default privileges:
    Code:
    GRANT ALL ON *.* TO 'zimbra' WITH GRANT OPTION;
    GRANT ALL ON *.* TO 'zimbra'@'localhost' WITH GRANT OPTION;
    GRANT ALL ON *.* TO 'zimbra'@'localhost.localdomain' WITH GRANT OPTION;
    GRANT ALL ON *.* TO 'root'@'localhost.localdomain' WITH GRANT OPTION;
    More on MySQL privileges at

    http://dev.mysql.com/doc/refman/4.1/en/grant.html

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  2. Replies: 3
    Last Post: 07-19-2007, 02:00 AM
  3. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  4. Replies: 18
    Last Post: 03-20-2006, 02:22 PM
  5. Can't start MySQL to init db - Gentoo
    By fak3r in forum Installation
    Replies: 3
    Last Post: 10-10-2005, 06:59 PM

Posting Permissions

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