简体   繁体   English

用于MySQL的Cuttlefish.io(Ruby on Rails)配置

[英]Cuttlefish.io (Ruby on Rails) configuration for MySQL

Default cuttlefish.io configuration (from Git repository https://github.com/mlandauer/cuttlefish ) is based on use of a Postgres DB. 默认的cuttlefish.io配置(来自Git存储库https://github.com/mlandauer/cuttlefish )基于Postgres DB的使用。 How to change it to use a MySQL DB? 如何更改它以使用MySQL数据库?

More specifically: 进一步来说:

  • What to put in [...]/cuttlefish-master/config/database.yml to switch to MySQL, and specify DB user and password? 放入[/cuttlefish-master/config/database.yml]以切换到MySQL,并指定数据库用户和密码是什么?
  • Is there a MySQL adapter to install? 是否要安装MySQL适配器? How to do it? 怎么做?

Thx 谢谢

  • In Gemfile change the lane: Gemfile更改车道:

     gem 'pg' 

    to: 至:

     gem 'mysql2' 
  • Run bundle install 运行bundle install

  • In config/database.yml change the lane: config/database.yml更改通道:

     adapter: postgresql 

    to: 至:

     adapter: mysql 

For other configuration options refer to the official configuration guide 有关其他配置选项,请参阅官方配置指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM