V
V
Valery Ryaboshapko2014-02-20 02:02:34
MySQL
Valery Ryaboshapko, 2014-02-20 02:02:34

How to implement user authorization using MySQL?

There is an idea to launch a project consisting of a large database and motley clients on several platforms (Android, iOS, Linux, Windows). It implies the creation of a separate account for each user.
The question is, is it possible to push authorization tasks to a DBMS (for example, MySQL or PostgreSQL)?
I imagine it in such a way that an account is created for each user and a personal table is allocated to him for personal data. The user gets the rights to write to his table, to read from the "public" tables and to read from the personal tables of friends. Access rights in the same MySQL are very flexibly configured.
There are several questions.

  1. How safe is it? I have never seen DBMS reliability tests looking directly into the network.
  2. How effective is it? Can any MySQL handle direct requests from several thousand users?
  3. So really no one does, or have I missed something in this life?
  4. Well, actually, if no one does, then why?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yuri Morozov, 2014-02-20
@metamorph

You will be buried in max_connections.
You will either have to stuff the server with memory, or, at any opportunity, close the user's connection to the database.
In a hypothetical situation where max_connections == 100 and 100 users have opened a connection and are dumb, the 101st user will get a thrashing (unless he is a superuser).

S
Sergey, 2014-02-20
Protko @Fesor

usually between the client and the subd there is such a trifle as the server, which actually implements authorization, work with data, etc. and provides the client with an API ( rest api )
No one does this, at least because it is not convenient and impractical. There are problems with extensibility, the connectedness of the system increases and, in the end, DBMSs are not designed for this.

O
OnYourLips, 2014-02-20
@OnYourLips

You need to make a layer of logic, the easiest way is through REST.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question