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

前端 未结 7 779
轻奢々
轻奢々 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:02

    make sure the port number that you have set while creating MySQL(e.g.: 7777), please add port number with appropriate 'username' and 'password'.

    default: &default
      adapter: mysql2
      encoding: utf8
      pool: 5
      username: root
      password: admin
      host: localhost
      port: 7777
    

    in the database.yml in config directory of your app directory.

提交回复
热议问题