Configuration of database connection information
Stefan Majewsky
kdemailinglists at bethselamin.de
Tue May 4 09:20:21 BST 2010
Am Montag, 3. Mai 2010 16:10:49 schrieb Lynn Hazan:
> My application will have multiple users but internally the database will be
> accessed through a unique dedicated database account.
>
> unix user1 -->
> unix user2 --> application --- dedicated database user ---> database
> unix user3 -->
>
> This way, my application only needs to have the database connection
> information (user/password) of the dedicated database user. Plus, of
> course, the general database connection information (host, database name).
>
> You see that the database connection information is not something to be
> modified by the end users, it is independent of the user connecting to the
> application.
>
> Now I have to solutions:
>
> 1/ I hard code in the application the database connection information
> (host, database name, dedicated database user name,dedicated database user
> password).
> 2/ I externalize the database connection information in a configuration
> file which will be read by the application.
3/ Let another network protocol do the connection stuff. For example, you
could setup the database server to permit local logins without password*, then
setup SSH for a local user, allow port forwarding to the local MySQL port, and
authorize the public keys of all client user accounts.
The hostname of the database server could be advertised via DNS, and you won't
need to distribute config files at all.
* The fine print: I do not know whether this is possible with your DB server.
Greetings
Stefan
More information about the kde-core-devel
mailing list