Rails development - Can't connect to MySQL server on 'localhost' (10061)

前端 未结 7 695
轻奢々
轻奢々 2020-12-30 04:39

I\'m a Rails developer newbie using MySQL as the database. I can successfully connect to MySQL using the command:

MySQL -u macDaddy -p

at t

相关标签:
7条回答
  • 2020-12-30 05:10

    It's because you don't have password set in your database server(mysql), try this:

    development:
      adapter: mysql2
      encoding: utf8
      reconnect: false
      database: bookmobile
      pool: 5
      username: macDaddy
      password:
      host: localhost
      socket: mysql
      port: 3306
    
    0 讨论(0)
提交回复
热议问题