/** * Creates a new database under this user. * * @param string $name Database name, without <user>_ prefix * @param string $username Username to access the database with, without <user>_ prefix * @param string|null $password Password, or null if database user already exists * @return Database Newly created database */ public function createDatabase($name, $username, $password = null) { $db = Database::create($this->getSelfManagedUser(), $name, $username, $password); $this->clearCache(); return $db; }
/** * Deletes the access host. */ public function delete() { $this->getContext()->invokePost('DATABASES', ['action' => 'accesshosts', 'delete' => 'yes', 'db' => $this->database->getDatabaseName(), 'select0' => $this->getName()]); }