For each user its own database

Hello!
Blink server has two users and there are two databases. How to make each user had his own database?

You just said it… each user account is independent of the other, so separate database for each.

How to do so:
User1 on the server blink writes to the database1
User2 on the server blink writes to the database2

sorry for my bad english

First you need to set it up, if you havent already…

Sorry I am not a DB guy, so in depth knowledge will have to come from others… but most likely your own learning. :stuck_out_tongue:

But as far as using it beyond what is automatically done… storring all Virtual Pin contents over time (I think) & long term graphing data (you can export the CSV from within the SuperChart to be emailed), I suppose you need to head over to https://www.postgresql.org/ to learn how to use it more in depth with HTTP RESTful API or whatever other means may be available.

I do not need to do this in PostgreSQL.
Blink should understand from whom the user in which database to write

In any case, thanks. wait maybe someone will help)

Well, you haven’t actually said what it is you are trying to do…

Blynk, does… and without any intervention on your part (and Blynk uses PostgreSQL, assuming you properly installed it).

So again I say, each user account is already independent from all others and thus each has their own DB in which their individual projects store their individual data.

So, what exactly are you trying to do and why do you feel it is not working for you? So that someone will know how to help :wink:

Separate DB per user? Seems very strange setup for me. Why would you need that?

OK, sounds like I clearly don’t understand DB :stuck_out_tongue_winking_eye: I guess a single DB can have separate… compartments?.. then, each to a users account. I will just keep watching and learn :slight_smile:

Well. It depends. Separate DB may be the separate physical instance. It may be separate namespace within same physical DB.

1 Like

Here’s what we have:

  1. The main project (Project1)
  2. The project for debugging (Project2)
  3. One common server PostgreSQL database
  4. One common database for both projects
  5. One user on the blynk server with Project1 and Project2

If I understand correctly, the projects are created in the user’s blink server.
When we do debugging in Project2, its data is fed into the same table as Project1. We do not need that.

Therefore, I wanted to bring each project into a separate database -__-

PS It would be nice to make the RU communities :slight_smile:

OK. How to correctly create a new user so that he has his own database? :roll_eyes:

Well I may be misinterpreting how you and Blynk refer to “separate databases”… Near as I can tell, even individual projects under the same user account all have separate data storage within the “single” database installed by Blynk (e.g one cannot see or manipulate the other… unless Bridge counts as sharing).

However, to create a new Account, under the same server, simply create a new one from the App. You will need to be logged out of any existing account to do that, or on a different phone/tablet.

I already did that. The new user uses a common database. It’s not that.

For the developers. IMHO it is possible to make each user on the blink server use his PostgreSQL database. Or each project on the server used a separate PostgreSQL database. Optional.:wink:

Thank you all for the answers, if I find a solution to my question, then I must unsubscribe.:grinning:
It would also be nice to send the Russian community:smiley:

Well, you SIILL haven’t explained why you could possibly want or need a separate running database for each user or project. It hasn’t been needed by anyone else so far, and I can imaging that even if it where “easily” done, it would start overloading the server.

But it you absolutely want it… and since RPis are affordable enough, just simply create a dedicated Local Server for each user… then everyone has a server and database all to themselves :stuck_out_tongue:

Blynk and this forum is already an international community, and thanks to Google, language isn’t even much of a barrier :smiley: Hope you stick around.