Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-27-2007, 12:42 AM
ljl ljl is offline
New Member
 
Posts: 3
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..
Reply With Quote
  #2 (permalink)  
Old 04-27-2007, 03:24 AM
Moderator
 
Posts: 2,207
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 ?
Reply With Quote
  #3 (permalink)  
Old 04-27-2007, 06:04 PM
ljl ljl is offline
New Member
 
Posts: 3
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
Reply With Quote
  #4 (permalink)  
Old 04-29-2007, 01:06 AM
Project Contributor
 
Posts: 136
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
Reply With Quote
  #5 (permalink)  
Old 05-08-2007, 12:55 PM
Loyal Member
 
Posts: 78
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
Reply With Quote
  #6 (permalink)  
Old 05-10-2007, 01:41 AM
Member
 
Posts: 11
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
Reply With Quote
  #7 (permalink)  
Old 05-13-2011, 08:14 AM
New Member
 
Posts: 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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.