https://github.com/diaspora/diaspora/wiki/Migrating-from-MongoDB-to-MySQL
- Update your source
- git fetch upstream
- git checkout master
- git pull upstream master
- Install mysql packages
- apt-get install mysql-server mysql-client libmysqlclient16-dev
- Make sure you're utf8 all the way, Diaspora is
- sudo vi /etc/mysql/my.cnf
- Update the server section [mysqld]
- collation_server=utf8_bin
character_set_server=utf8
- collation_server=utf8_bin
- Update the client section [mysql]
- default-character-set = utf8
- Update the server section [mysqld]
- sudo vi /etc/mysql/my.cnf
- Restart MySQL
- service mysql restart
- Create your database.yml
- cp config/database.yml.example config/database.yml
- Edit your new yaml file to suit your environment
- Note As of this writing, only the MySQL user root can migrate from mongo to MySQL
- Create the necessary databases and tables
- rake db:drop:all
- Make sure test, development, and production all have valid credentials (for root mysql user)
- You can safely ignore messages like:
Couldn't drop diaspora_production : <Mysql2::Error: Unknown database 'diaspora_production'>
- rake db:create
- rake db:migrate
- rake migrations:migrate_to_mysql
- rake db:drop:all
Voila, you should now have everything you need to help the community continue to test this massive change...
No comments:
Post a Comment