To run MySQL on dotcloud is very easy, just follow the documentation:
add the following lines to dotcloud.yml:
1 2 |
db: type: mysql |
then push the app, and run
1 |
% dotcloud info app.db |
to get the mysql password.
We suggest you should create your own user/pass for each specific app:
1 2 3 4 5 6 7 8 9 10 |
% dotcloud run app.db -- mysql -u root -pTHEPASSWORD mysql> CREATE USER 'appuser' IDENTIFIED BY 'choosepasswordcarefully'; Query OK, 0 rows affected (0.02 sec) mysql> CREATE DATABASE newapp; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL ON newapp.* TO 'appuser'@'%'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) |
Then we’re done. So far, we run the wordpress on Amazon EC2, and keep the mysql database on dotCloud. Next step we will move the wordpress files from EC2 to dotCloud (AFAIK, it’s on EC2, too), to keep platform-maintain-free. :