Page 1 of 1

Create Database for existing database user

Posted: Thu Apr 06, 2017 12:40 am
by mericson
Is there a way to create a database with access for an existing database user? I don't really want to have to create/manage a user for ever database created. CPanel and some other web panels make it easy to associate users with databases without having to use MySQL.

Re: Create Database for existing database user

Posted: Thu Apr 06, 2017 12:49 am
by mericson
I discovered if I create another database using an existing database username, that user will have permissions added for the new database. However, it also requires me to enter the password again so there is a potential of overwriting the existing password which may not be desireable.

IMHO there should be an option to create a database using an existing user separate from creating a database while creating a new user. That could also prevent inadvertently overwriting the password of an existing database user.

Re: Create Database for existing database user

Posted: Thu Apr 06, 2017 6:01 pm
by Falzo
you might also want to try what is happening if you remove one of those databases. my guess would be your db user is getting removed as well, which may break things for the second database and so on...

Re: Create Database for existing database user

Posted: Fri Apr 07, 2017 1:41 am
by mericson
Yea, good point. But a user database seems akward. For a aingle site which might have CMS, e-commerce, forums, etc. Why force a database user for each database?