Divorce database creation from database user creation

orangekay

New member
Joined
Jun 27, 2006
Messages
2
Unless I'm missing something, DirectAdmin forces you to assign a brand new database user for every database you create. This makes it impossible to grant access to a single user on multiple databases from within DirectAdmin, and honestly makes no sense to me at all. Obviously the problem can be solved on the command line, but there's no good reason why it shouldn't be possible to recycle an existing user in the CP.
 
I'll see if I can work it so that there is a dropdown option to use an existing user when creating a new db for the next release. (adding to the versions system). I'll have to make sure it stil works for things like user permissions, access hosts, etc, so that the settings only affect the user on that DB.. but that's my problem ;) Added hopefully for the next release (finnaly ;))

John
 
This is now possible through the control-panel, but is it also possible through the API? I'm trying to figure out how to do it, but no matter how I build my query, it seems to fail for various reasons (users already exists, invalid password).

In short: How do I create a database with an existing database-user through the API?
 
Hello,

You don't require a username anymore.
You can check the html form in the interface to see exactly what is passed, but a quick glance over what I did show that all you do is add:

userlist=existinguser

which DA will then see, and assign it to the user variable (internall in DA) thus using an existing user and not requiring a new user for the new db.
The other forum values (user, passwd, passwd2 are not required if you pass userlist)

John
 
Back
Top