Resources » MySQL

Resource Creation

You can create MySQL databases using the convox resources create command:

$ convox resources create mysql
Creating mysql-3785 (mysql)... CREATING

This will provision MySQL database on the Amazon RDS service. Creation can take up to 15 minutes. To check the status use convox resources info.

Additional Options

--allocated-storage=10Size of the database in GB
--database=<database-name>The name of the database to create
--instance-type=db.t2.microRDS instance type to use
--multi-azEnhanced availability and durability
--name=<name>The name of the resource to create
--password=<password>Database server password
--privateCreate in private subnets
--username=<username>Database server username

Resource Information

To see relevant info about the database, use the convox resources info command:

$ convox resources info mysql-3785
Name    mysql-3785
Status  running
URL     mysql://mysql::)t[THpZ[wmCn88n,N(

Resource Linking

You can add this URL to any application with convox env set:

$ convox env set 'DATABASE_URL=mysql://mysql::)t[THpZ[wmCn88n,N(' --app example-app

Resource Update

You can change options like multi-zone availability with convox resources update:

$ convox resources update mysql-3785 --multi-az
Updating mysql-3785 (multi-az="true")...UPDATING

Resource Deletion

To delete the database, use the convox resources delete command:

$ convox resources delete mysql-3785
Deleting mysql-3785... DELETING

Deleting the database will take several minutes.

This action will cause an unrecoverable loss of data.