Correct MySQL configuration for Ruby on Rails Database.yml file

前端 未结 6 645
终归单人心
终归单人心 2020-12-02 08:03

I have this configuration:

development:
  adapter: mysql2
  encoding: utf8
  database: my_db_name
  username: root
  password: my_password
  host: mysql://12         


        
6条回答
  •  余生分开走
    2020-12-02 08:42

    You should separate the host from the port number. You could have something, like:

    development:
      adapter: mysql2
      encoding: utf8
      database: my_db_name
      username: root
      password: my_password
      host: 127.0.0.1
      port: 3306
    

提交回复
热议问题