[FAQ] Can single database user manage multiple databases?

Refers to:

  • Plesk for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 13:20:18 UTC

Modified:

2016-12-21 20:29:32 UTC

0

Was this article helpful?


Have more questions?

Submit a request

[FAQ] Can single database user manage multiple databases?

Answer

It is possible to create user which can manage all databases on given subscription since Plesk 11.5 (see release notes for preview release).

However, quick switch between databases in DB Webadmin (phpMyAdmin) would be not available, as phpMyAdmin is always opened for a specific database.

In versions prior to 11.5, permissions to manage additional databases should be granted manually.

Important: manually granted permissions will not be registered by Plesk, which means that user will not appear in control panel. It also means that such permissions will not be saved in backup or migrated by Plesk.

To grant database user permissions to manage another database, use these instructions:

  • MySQL : following SQL statements should be executed:
    >GRANT ALL PRIVILEGES ON <newdb>.* TO 'olduser'@'%';
    >FLUSH PRIVILEGES;
    • PostgreSQL : login to template1 database, grant all privileges on database to user and add user into a group with the same name as database:

      su - postgres

      $ psql template1template1=# grant all privileges on database newdb to olduser;GRANTtemplate1=# grant newdb to olduser;GRANT ROLEtemplate1=# \dg List of roles Role name | Attributes | Member of-----------+--------------+---------------------------------... olduser | | {olddb,newdb}...* MSSQL : open SQL Server Management Studio (free download from Microsoft website for SQL Server 2005 , 2008 and 2012 ). Connect to SQL server, in Object Explorer (left frame) expand Security → Logins , right-click on required database user and select Properties . In user properties, go to User Mapping , check new database and at the bottom select db_owner role and apply settings:

Have more questions? Submit a request
Please sign in to leave a comment.