Return to Homepage

Create Database User

http
POST /cranebase/services/{serviceId}/users

Creates a user on every host. 400 when the name is taken, 404 when database doesn’t exist.

Parameters

Field Type Required Default Description
username string Yes Name without the prefix: letters, numbers, dashes and underscores (max 60)
password string Yes Password (min 8 chars)
permissions array Yes Privileges on each database the user can reach: ALL, or any of SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, SHOW VIEW, CREATE VIEW, CREATE TEMPORARY TABLES, CREATE ROUTINE, ALTER ROUTINE, EXECUTE, EVENT
webadmin boolean No false Allow phpMyAdmin sign-in
active boolean No true false creates the user locked
database string No Full name of a database to give the user access to right away

Response (201)

json
{ "username": "sql1042_app", "message": "User created." }

Snagged on something?

Our sysadmins answer tickets around the clock.