| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 09/07/2008 12:11:25
|
Coldwind
Initiate
Joined: 26/05/2008 03:32:16
Messages: 7
Offline
|
Hi!
Im playing around a bit with inserting multiple points by uploading a tab-separated datafile. What is the easiest and most secure way to access the database?
Best regards!
/Joakim
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 09/07/2008 18:10:11
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1850
Offline
|
The embedded database (Derby) is configured to be single-user only, so you can only access it with Derby tools when Mango is not running. However, there is the SQL page within Mango that lets you run arbitrary SQL statements.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/06/2012 12:42:34
|
Dusan
Initiate
Joined: 30/05/2012 12:40:20
Messages: 15
Offline
|
Hi,
when I deploy project on Tomcat, and access it in Web browser, the watchlist is empty,
although I created data points in Eclipse (when run it on Tomcat Runtime Environment).
Any idea?
Thank you very much,
Dusan
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/06/2012 13:53:53
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1850
Offline
|
You've created two separate Derby databases i assume. Check the env.properties for the database location.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/06/2012 21:04:32
|
Dusan
Initiate
Joined: 30/05/2012 12:40:20
Messages: 15
Offline
|
This is content of src/env.properties:
#db.type=mysql
#db.url=jdbc:mysql://localhost/scadabr
#db.username=root
#db.password=
#db.pool.maxActive=10
#db.pool.maxIdle=10
db.type=derby
db.url=~/../../bin/scadabrDB
db.username=
db.password=
convert.db.type=
convert.db.url=
convert.db.username=
convert.db.password=
api.authentication=disabled
api.username=admin
api.password=admin
#security.hashAlgorithm=NONE
grove.url=http://mango.serotoninsoftware.com/servlet
What do I have to change?
Thank you very much
Dusan
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/06/2012 21:11:48
|
Dusan
Initiate
Joined: 30/05/2012 12:40:20
Messages: 15
Offline
|
And also, could explain me briefly why there are two databases? When are they used?
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/06/2012 22:42:25
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1850
Offline
|
You have two databases because the propery "db.url=~/../../bin/scadabrDB" resolved too two different locations depending on how you started Tomcat.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 21/06/2012 21:43:51
|
Dusan
Initiate
Joined: 30/05/2012 12:40:20
Messages: 15
Offline
|
Ok. Now, I am completely confused.
First to say, I use ScadaBR, so some urls are different.
I set Tomcat Runtime Environment in Eclipse, so I can run Mango inside Eclipse.
As I understood, Mango use only Deby database.
1. When I run Mango inside Eclipse, and for example add new user, where I can access (Derby) database
to see new user parameters? Where is database located?
Thank you very much
Dusan
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 22/06/2012 02:26:21
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1850
Offline
|
When you start Mango with Derby as your configured database, the first thing it does is try to find an existing database at the configured location, in this case db.url=~/../../bin/scadabrDB". This is a file system path. If the database is not found, a new one is created. It would seem that, depending on how you start Mango, the database path resolves to two different locations, which is why you have two different databases.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 22/06/2012 08:33:03
|
Dusan
Initiate
Joined: 30/05/2012 12:40:20
Messages: 15
Offline
|
I realized that Eclipse creates scadabrDB somewhere in workspace, so when I copy it to Tomcat/bin, it works. Thank you!
2. I always used phpMyAdmin (on Wamp server) for sql databases monitoring. Can I connect Mango with phpMyAdmin somehow?
Thank you very much
Dusan
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 22/06/2012 13:24:59
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1850
Offline
|
If you use MySQL, sure. But Derby is a single-user system, so you can't connect with Mango running. (I also don't know if phpMyAdmin would be able to connect to a Derby DB at all.) But there is always the SQL console within Mango itself.
|
Best regards,
Matthew Lohbihler |
|
|
 |
|
|