[Phpmyadmin-devel] batch user & db creation

Robin Johnson robbat2 at orbis-terrarum.net
Tue Jan 7 09:01:06 CET 2003


On Tue, Jan 07, 2003 at 08:41:00AM -0500, Marc Delisle wrote:
> - A new batch user and db creation mecanism. Starting
> from a local file like this:
> 	user1, password1
> 	user2, password2
> 	user3, password3
> 	...
> 
> we could upload this file.  There would be a radio button:
> 	() just create users
> 	() create users and generate a db named after the user
> 	() create users and generate a privilege that enables users to 
> 	create their dbs,
> 	   with the username as a prefix
extend the format slightly
user1, host1, pwd1, db1
user2, host2, pwd2, db2

and the "generate a db named after the user" can instead use the
specified dbname if given, else it can use the username as the dbname.

I think the file should have quotes in it, since space and comma
characters could be found in usernames/passwords/dbnames.
so:
'user1', 'host1', 'pwd1', 'db1'
'user2', 'host2', 'pwd2', 'db2'

maybe swap the order of host and password for easier use.
data like this can be generated in Excel easily as CSV format with
quotes.

> On the "Add a new user" new page, there are some dialogs that could be used
> also for the batch:
> 	- the host
> 	- the global privileges
Just abstract them to a function so that we can display identical
dialogues on both the creation page and the batch page.

> But I am not sure if the batch mecanism should be on the same page.
I think the batch stuff should definetly be on a sepearate page, as it
could get very confusing for some people.

> Of course, we need some validation to avoid creating databases that already 
> exist.
Display an error if the username or db already exists and continue with
the rest of the data.

-- 
Robin Hugh Johnson
E-Mail     : robbat2 at orbis-terrarum.net
Home Page  : http://www.orbis-terrarum.net/?l=people.robbat2
ICQ#       : 30269588 or 41961639
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20030107/f79f1c34/attachment.sig>


More information about the Developers mailing list