MySQL accounts

Eric

Verified User
Joined
Mar 25, 2004
Messages
110
Perhaps DA can come up with something similar to what cPanel does:
cPanel allows users to use only one username to manage all their MySQL databases while DA requires one username per database; this is inconvenient.

Examples:
In cPanel, user abc can manage all database names that start with abc_

In DA, username needs to be abc_something to manage database abc_somedatabase
 
Your main account username and password should have access to all databases under your account.
 
It does, and so does root. But users don't; users have to create a username for each database. DA doesn't create a MySQL account for users upon account creation.
 
Yes it does? I'm pretty sure I can login to phpMyAdmin with any username and password and it'll give me access to that user's databases. :)

Edit: I can confirm it now.
 
Last edited:
Any admin account, yes. But say, user abc has 3 databases (user abc is just a regular user):
abc_1
abc_2
abc_3
Upon account creation using DirectAdmin's admin control panel, user abc is not created in MySQL. User abc has to manually create a username for each of the database; in this case, abc_1, abc_2, abc_3. Is this true? If not, please show me how this can be done. Thank you.
 
I don't know how. It just works for me; I can login as abc and it'd show me his/her databases.

John? Mark? :)
 
Are you saying that DA creates MySQL users upon account creation? I have DA 1.212, and it doens't do this for me. :confused:

Where is this "Assign multiple databases to a single user" menu?
 
Last edited:
I have tested it on 3 different servers (all in different datacenters installed by different admins) and it behaves same way on all servers:

When you create directadmin account "abc" it doesn't create account "abc" for mySQL.

When "abc" creates first database "abc_1" then directadmin also automatically creates mysql user "abc" that has access to all databases created by "abc".

When user creates second database "abc_2" then directadmin adds that database to mysql user "abc" so in mysql "abc" has access to both "abc_1" and "abc_2"... and so on...
 
I think what Eric means is that in Cpanel, you can create a user and assign the databases to the user, rather than vica versa. So I could create the user 'matt_user' and assign it to two of my databases, even if I have four databases in total.

For example, try setting up two databases in DA and using the same username when you try to create them. It doesn't allow it, yet it's possible in cPanel.

Matt
 
Yes, that's exactly what I mean. In cPanel, upon account creation for user abc, it creates a user in MySQL with the same username abc, and abc automatically has access to all the databases he/she creates; for example, abc_1, abc_2, abc_3.

If I understand what CyberAlien is saying, DA creates 2 MySQL accounts when a user creates his/her first database; for example, user abc creates a database called abc_1 with a username abc_1; in MySQL, both username, abc and abc_1 will have access to database abc_1. Is that correct?
 
Last edited:
Eric said:
If I understand what CyberAlien is saying, DA creates 2 MySQL accounts when a user creates his/her first database?
Yes. One that has access to all databases that user created/will_create and other that has access only to newly created database.
 
Interesting. In my opinion, this is a bad design because MySQL will have a lot of rows of users.
 
It will have number of databases that user has created + one row. And if user didn't create any database then no entries for that user.
 
So if a user has 3 databases, he/she will have 4 usernames in the table user in database mysql. It'd be nice if the username creation is not mandatory. :)
 
Perhaps we can start a poll and have people vote on this feature.
 
I hear you guys :) I'll try for this release, and if not, just bump the thread shortly after that so I get it into the next one.

John
 
Back
Top