Results 1 to 7 of 7

Thread: how to connect to database

  1. #1
    ljl
    ljl is offline New Member
    Join Date
    Apr 2007
    Location
    Dalian LiaoNing ,China PRC
    Posts
    3
    Rep Power
    8

    Default how to connect to database

    hello everyone
    there is some questions ,I need you help

    How can I use JSP page to connect to mysql database of zimbra.

    Could anybody help me about this please?

    Thanks a lot for your kindly help.

    best regards
    Last edited by ljl; 04-27-2007 at 01:35 AM.

  2. #2
    Klug's Avatar
    Klug is offline Moderator
    Join Date
    Mar 2006
    Location
    Beaucaire, France
    Posts
    2,292
    Rep Power
    13

    Default

    Please stop crossposting in all subforums.

    Could you please explain a bit more what you want to do ?
    Do you "just" need to access mysql database ?
    Or do you want to develop some JSP pages ?

  3. #3
    ljl
    ljl is offline New Member
    Join Date
    Apr 2007
    Location
    Dalian LiaoNing ,China PRC
    Posts
    3
    Rep Power
    8

    Default I am so sorry

    hi
    Quote Originally Posted by Klug View Post
    Please stop crossposting in all subforums.

    Could you please explain a bit more what you want to do ?
    Do you "just" need to access mysql database ?
    Or do you want to develop some JSP pages ?
    This question is very argent,so I put this message every where.

    I am so sorry to do that , I just need your help.

    My question is :

    I need to connect to Zimbra's Mysql database use Java language.

    In my opinion ,Zimbra's database is database pool ,the port is 7306, but I can not get this connection, is anyone could tell me about this ?

    by the way , I am from China , my English is very poor ,so if I say some wrong words ,please fogive me.

    best regrads

  4. #4
    cvidal is offline Project Contributor
    Join Date
    Dec 2005
    Posts
    146
    Rep Power
    9

    Default

    Quote Originally Posted by ljl View Post
    ...
    I need to connect to Zimbra's Mysql database use Java language.

    In my opinion ,Zimbra's database is database pool ,the port is 7306, but I can not get this connection, is anyone could tell me about this ?
    You probably need the correct MySQL password. The following script will give you MySQL access and at the same time will show you the database root password:

    Code:
    #!/bin/bash
    #
    
    source ~zimbra/bin/zmshutil || exit 1
    zmsetvars zimbra_home mysql_directory mysql_socket mysql_root_password
    
    echo ${mysql_root_password}
    
    ${mysql_directory}/bin/mysql -h localhost -P 7306 --protocol=tcp \
            --user=root --password=${mysql_root_password} $*
    From Java you can use the same user, password, host and port.

    I hope it helps :-)

    Carlos

  5. #5
    Artturi is offline Loyal Member
    Join Date
    Dec 2006
    Location
    Paris
    Posts
    78
    Rep Power
    8

    Default

    Hello,

    There may also be some version problems since zimbra uses mysql 5 and there has been changes regarding password storage or authentication between mysql 4 & 5.

    So it may be worth checking your client libraries if it doesn't work.

    Regards,
    Artturi

  6. #6
    mrojek is offline Member
    Join Date
    May 2007
    Location
    Poland Warszawa
    Posts
    11
    Rep Power
    7

    Default Connect to zimbra Mysql

    In defuals you cann't connect to zimbra Mysql server from remonte host. It is blocked you must chnage it in mysql config file. Of course if you have god user and password for user. In defaults are 2 user zimbra and if I good remamber admin

  7. #7
    moiseev.igor is offline New Member
    Join Date
    May 2011
    Posts
    3
    Rep Power
    3

    Default

    For one how ends-up on the page searching for the solution, it seems there is one appropriate command to perform the task

    zimbra@zimbra:/opt/zimbra$ zmmypasswd
    Usage: $ zmmypasswd [ --root ] newpassword

    By default, this script changes zimbra_myql_password. If the --root
    option is specified, then mysql_root_passwd is changed. In both cases,
    MySQL is updated with the new passwords. This script can not bail you
    out of a situation where you have lost your mysql root password -
    consult MySQL documentation to see how you can start the server
    temporarily to skip grant tables, so you can override the root
    password.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 23
    Last Post: 01-24-2013, 03:44 PM
  2. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  3. Bad 5.0b2 upgrade
    By JoshuaPrismon in forum Installation
    Replies: 1
    Last Post: 07-26-2007, 07:34 PM
  4. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 11:11 PM
  5. Can't send or receive mails from Zimbra
    By ppurama in forum Administrators
    Replies: 4
    Last Post: 11-14-2005, 10:17 AM

Posting Permissions

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