public static function create(User $user, $name, $username, $password)
    {
        $options = [
            'action' => 'create',
            'name' => $name,
        ];
        if (!empty($password)) {
            $options += ['user' => $username, 'passwd' => $password, 'passwd2' => $password];
        } else {
            $options += ['userlist' => $username];
        }
        $user->getContext()->invokeApiPost('DATABASES', $options);
        return new self($name, $user, $user->getContext());
    }