Updated: August 2nd, 2013
The MySQL 5.1 database is a candidate for testing on Engine Yard Cloud. Read this page if you want to participate in the MySQL 5.1 Early Access program.
Important! MySQL 5.1 on Engine Yard Cloud is an Early Access feature. Always test first in a development or staging environment.
Enable the MySQL 5.1 feature
You need to enable the Early Access feature before you can participate in the program.
To enable the MySQL 5.1 Early Access
-
Log in to your Engine Yard Cloud account.
-
On the dashboard, click Tools > Early Access on the toolbar.
-
Next to the MySQL 5.1 feature, click Enable.
The related functionality becomes available.
Get started with MySQL 5.1
The process for setting up and running your application on MySQL 5.1 depends on your current environment.
-
Is this a new application? Then do this:
-
Are you running Engine Yard Cloud with MySQL 5.0.x now? Then, do these tasks:
-
Are you migrating a MySQL-based application to Engine Yard Cloud from another platform? Then, do these tasks:
-
Are you using a database other than MySQL? Then:
Please consult Engine Yard Professional Services for assistance migrating your database to MySQL 5.1.
Set up an application to use MySQL 5.1
Follow this procedure to set up a new environment that uses a MySQL 5.1 database. You can create a new application and a new environment or create a new environment for an existing application.
If you are migrating an existing MySQL database, you’ll need to perform a dump and restore after creating a new environment (Dump and restore an existing MySQL database).
To use MySQL 5.1 with Engine Yard Cloud
-
Important: If you have applied any custom Chef recipes for MySQL, disable them in your ey-cloud-recipes repository. You may re-apply them to your new database instance after completing the tasks on this page.
For general information about custom Chef recipes, see Custom Chef recipes. -
Create a new application with a new environment or add an environment to an existing application, making sure to:
-
Set the Database Stack to MySQL 5.1.x. If this option is not available, see Troubleshooting.
-
Add the mysql2 gem to your Gemfile for Rails 3 (or via the dashboard for Rails 2).
source "http://rubygems.org"
gem "mysql2" -
Select SSH Keys.
This allows you to SSH into the new instance and to copy the database dumpfile to the instance, described in the procedure below.
-
-
Deploy the application.
Dump and restore an existing MySQL database
If you are currently running a MySQL database (5.0.x), you need to dump the database, create a new MySQL environment, move the database dump file to the database instance, and finally load the file into the MySQL database.
You can perform these tasks yourself (as outlined below) or ask Engine Yard Professional Services to do the migration for you.
To dump and restore the MySQL database
See the MySQL documentation for full details on dumping and restoring a database.
Note: The following commands assume you are logged into the db_master instance.
-
Dump the database.
mysqldump -u #{user} -p -h #{hostname} #{dbname} | gzip > dumpfile.sql.gz
Note: dbname is the name of the database used by your application. hostname is the name of the server or instance hosting your MySQL 5.0.x database. For more information, see Find your generated MySQL password and connect to your DB.
For example,
mysqldump -u deploy -p -h ec2-172-72-33-150.us-west-1.compute.amazonaws.com mydatabase | gzip > dumpfile.sql.gz
-
Move the output file to the new environment.
scp dumpfile.sql.gz username@newserver:/#{path_to_file}/
For example,
scp dumpfile.sql deploy@ec2-174-129-17-196.compute-1.amazonaws.com:/tmp/mysql
Note: The new server is the database instance assigned for your MySQL 5.1 environment that you created above.
-
SSH to the new database instance.
-
Import the output file to the new MySQL 5.1 database.
gunzip < dumpfile.sql | mysql -u #{user} -p -h #{hostname} #{dbname}
-
Test the application running in the new environment.
-
After verifying that your application is running correctly in the new environment, delete the old environment (running MySQL 5.0.x).
Connect to your MySQL 5.1 database
To connect to your MySQL 5.1 database
More information
For more information about... | See... |
---|---|
Database tasks | Managing your database (Many of the tasks apply to MySQL 5.1 as well as to MySQL 5.0.) |
MySQL | MySQL documentation |
SSHing to your database | Connect to your instance via SSH |
SSH public keys | Using SSH on Engine Yard Cloud |
Deleting an environment | Delete an environment documentation |
Troubleshooting
This table contains troubleshooting tips related to MySQL and the Early Access program.
Symptom | Solution |
---|---|
I don't have the Database Stack option for MySQL 5.1 on my new environment page. | You need to enable the MySQL 5.1 feature. See Enable the MySQL 5.1 feature. |
Get help or provide feedback
If you have any issues or questions about this Early Access feature, use the Early Access Feature Feedback forum.
If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.
Hi, when do you plan to support MySQL 5.6? Some pretty interesting performance improvements in it:
http://www.mysql.com/why-mysql/white-papers/whats-new-mysql-5-6/
The timeline for supporting 5.6 has not been defined yet but it is not imminent. With MySQL releases we tend to give the major versions some time to "age" before making them available. While this may change for future versions of MySQL general support will usually follow the major GA by around 6 months. We may have an offering available through Limited or Early Access prior to this.
MySQL has been out now for 2 years. It's matured quite well, with the latest minor version 5.6.14 released in September. Amazon AWS instances have been supporting MySQL 5.6 since July 1,2013. Given the great updates 5.6 has over 5.5, I hope this is released even in limited or early access soon.
Hi Doug --
Thanks for the note! We are planning to update mySQL soon.
--Tasha