Contents

Cloud SQL

Cloud SQL instances are relational database servers you can build and manage via the Brightbox Cloud API (and therefore via our CLI tool and web based GUI).

Cloud SQL instances can be built in any zone within a region. An instance’s specification, such as RAM size and number of CPU cores, is defined by its instance type.

Cloud SQL supports MySQL versions 5.5 and 5.6 and PostgreSQL version 9.5.

Access

Cloud SQL instances are made accessible by mapping Cloud IPs to them.

When an instance is first created, admin credentials are automatically generated by the API. The credentials are only displayed at create time, since the admin password is not stored by the API, so cannot be retrieved later.

A new password can be generated at any time, using the “Reset admin password” action. This generates a new admin password and updates the instance with it.

For convenience, Cloud SQL instances created from snapshots inherit the admin password from the snapshot, rather than generating a new one each time.

Snapshots

Creating a snapshot of a Cloud SQL instance takes an instant and consistent copy of the databases stored on it. Snapshots can be created manually at any time and also automatically by specifying a schedule.

The Cloud SQL snapshot is then copied to your images container in Orbit, our highly-available storage service which is replicated across multiple zones.

The snapshot itself is instantaneous, but the copy process can take anything from 30 seconds to several minutes depending on the size of the databases and the load on your instance.

During the copy process, the snapshot is held on the instance so the instance cannot be destroyed until the copy is completed.

New Cloud SQL instances can be built using a snapshot as a starting point, essentially cloning an instance. Instances created from snapshots inherit the admin password from the snapshot.

Cloud SQL snapshots can be deleted from the images container in Orbit at any time using Brightbox Manager or the CLI.

Weekly maintenance window

Minor version updates to the database engine are automatically applied during a weekly one hour maintenance window.

The maintenance window can be set to any hour during the week but defaults to Sunday morning between 06:00am and 07:00am UTC.

During any updates, service can be interrupted for short periods of time if the instance needs to be restarted.

Minor version updates are from the upstream vendor, and will usually only contain bug and security patches.

Engines

MySQL

The Cloud SQL MySQL engine supports versions 5.5 and 5.6. You can specify which version at create time. The latest minor version is used at create time and any new point releases from then on will be installed in the weekly maintenance window.

MySQL snapshot compatibility

Snapshots are compatible between point releases but not between minor versions. So you cannot snapshot a MySQL 5.5 instance and create a 5.6 instance from the snapshot. To upgrade minor versions, create a new instance and use the standard mysql tools to take and reload a database dump.

Snapshotting MyISAM tables

The snapshot process depends on crash recoverable storage engines, such as InnoDB. MySQL’s MyISAM engine is not a crash recoverable storage engine so snapshots of MyISAM tables may result in incomplete or corrupt data.

If you need to use MyISAM tables, then you can minimise the risk of corrupted tables in snapshots by flushing and locking them prior to making a snapshot. They only need to be locked for a few seconds at the start of the snapshot, and not during the copy process.

PostgreSQL

The Cloud SQL PostgreSQL engine supports version 9.5. You can specify which version at create time. The latest minor version is used at create time and any new point releases from then on will be installed in the weekly maintenance window.

PostgreSQL extensions

The following PostgreSQL extensions are available for use and can be activated using the standard CREATE EXTENSION command.

 lo                           | 1.0    | Large Object maintenance
 postgis_tiger_geocoder       | 2.3.0  | PostGIS tiger geocoder and reverse geocoder
 insert_username              | 1.0    | functions for tracking who changed a table
 postgres_fdw                 | 1.0    | foreign-data wrapper for remote PostgreSQL servers
 btree_gin                    | 1.0    | support for indexing common datatypes in GIN
 tcn                          | 1.0    | Triggered change notifications
 seg                          | 1.0    | data type for representing line segments or floating-point intervals
 pg_prewarm                   | 1.0    | prewarm relation data
 isn                          | 1.0    | data types for international product numbering standards
 xml2                         | 1.0    | XPath querying and XSLT
 file_fdw                     | 1.0    | foreign-data wrapper for flat file access
 chkpass                      | 1.0    | data type for auto-encrypted passwords
 uuid-ossp                    | 1.0    | generate universally unique identifiers (UUIDs)
 intagg                       | 1.0    | integer aggregator and enumerator (obsolete)
 refint                       | 1.0    | functions for implementing referential integrity (obsolete)
 dict_xsyn                    | 1.0    | text search dictionary template for extended synonym processing
 address_standardizer         | 2.3.0  | Used to parse an address into constituent elements.
 ip4r                         | 2.1    | 
 cube                         | 1.0    | data type for multidimensional cubes
 plperl                       | 1.0    | PL/Perl procedural language
 intarray                     | 1.0    | functions, operators, and index support for 1-D arrays of integers
 ltree                        | 1.0    | data type for hierarchical tree-like structures
 earthdistance                | 1.0    | calculate great-circle distances on the surface of the Earth
 hstore_plperl                | 1.0    | transform between hstore and plperl
 hstore                       | 1.3    | data type for storing sets of (key, value) pairs
 tsm_system_time              | 1.0    | TABLESAMPLE method which accepts time in milliseconds as a limit
 pgrowlocks                   | 1.1    | show row-level locking information
 pg_stat_statements           | 1.3    | track execution statistics of all SQL statements executed
 tsearch2                     | 1.0    | compatibility package for pre-8.3 text search functions
 tablefunc                    | 1.0    | functions that manipulate whole tables, including crosstab
 hstore_plperlu               | 1.0    | transform between hstore and plperlu
 pltclu                       | 1.0    | PL/TclU untrusted procedural language
 pg_buffercache               | 1.1    | examine the shared buffer cache
 pg_freespacemap              | 1.0    | examine the free space map (FSM)
 postgis_topology             | 2.3.0  | PostGIS topology spatial types and functions
 timetravel                   | 1.0    | functions for implementing time travel
 citext                       | 1.1    | data type for case-insensitive character strings
 moddatetime                  | 1.0    | functions for tracking last modification time
 pltcl                        | 1.0    | PL/Tcl procedural language
 pgstattuple                  | 1.3    | show tuple-level statistics
 adminpack                    | 1.0    | administrative functions for PostgreSQL
 plpgsql                      | 1.0    | PL/pgSQL procedural language
 postgis_sfcgal               | 2.3.0  | PostGIS SFCGAL functions
 sslinfo                      | 1.0    | information about SSL certificates
 pg_trgm                      | 1.1    | text similarity measurement and index searching based on trigrams
 address_standardizer_data_us | 2.3.0  | Address Standardizer US dataset example
 dblink                       | 1.1    | connect to other PostgreSQL databases from within a database
 unaccent                     | 1.0    | text search dictionary that removes accents
 plperlu                      | 1.0    | PL/PerlU untrusted procedural language
 autoinc                      | 1.0    | functions for autoincrementing fields
 dict_int                     | 1.0    | text search dictionary template for integers
 pageinspect                  | 1.3    | inspect the contents of database pages at a low level
 btree_gist                   | 1.1    | support for indexing common datatypes in GiST
 tsm_system_rows              | 1.0    | TABLESAMPLE method which accepts number of rows as a limit
 plv8                         | 1.4.8  | PL/JavaScript (v8) trusted procedural language
 pgcrypto                     | 1.2    | cryptographic functions
 postgis                      | 2.3.0  | PostGIS geometry, geography, and raster spatial types and functions
 fuzzystrmatch                | 1.0    | determine similarities and distance between strings

Types

Cloud SQL instance specifications are set at create time by setting a Cloud SQL type. There are several Cloud SQL types available and are listed on the pricing page, in the Brightbox Manager GUI and in the CLI. A type specifies the combined RAM, disk size and number of cpu cores of the Cloud SQL instance.

Upgrading or downgrading a Cloud SQL instance

To change the type of an instance, you should snapshot it and create a new instance of the desired type from the snapshot.

When downgrading, you must ensure that the snapshot data size is not larger than the capacity of the smaller instance type.

Billing

Cloud SQL instances are billed by the hour, starting from when it is first created until it is destroyed. Data between the instance and the Internet is billed per gigabyte at the standard Internet data rates. Data between the instance internally from within the same region is free.

Snapshot storage is billed per gigabyte at the Orbit storage rate.

Last updated: 02 Nov 2016 at 13:23 UTC

Try Brightbox risk-free with £20 free credit Sign up takes just two minutes...