Create Database for existing database user

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
mericson
Posts: 21
Joined: Thu Apr 06, 2017 12:37 am

Create Database for existing database user

Postby mericson » Thu Apr 06, 2017 12:40 am

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.

mericson
Posts: 21
Joined: Thu Apr 06, 2017 12:37 am

Re: Create Database for existing database user

Postby mericson » Thu Apr 06, 2017 12:49 am

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.

Falzo
Posts: 41
Joined: Mon Mar 28, 2016 8:49 am

Re: Create Database for existing database user

Postby Falzo » Thu Apr 06, 2017 6:01 pm

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...

mericson
Posts: 21
Joined: Thu Apr 06, 2017 12:37 am

Re: Create Database for existing database user

Postby mericson » Fri Apr 07, 2017 1:41 am

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?


Return to “Database Server”



Who is online

Users browsing this forum: No registered users and 2 guests