请问怎么用etco跑mysql这个报错怎么搞

作者 peter_ji 所属板块 问答
could not find executable `mysql` in path, please guarantee it is available before running ecto commands ``` config :elixir_china, ElixirChina.Repo, adapter: Ecto.Adapters.MySQL, database: "elixir_china", username: "root", password: "rcc123", hostname: "localhost", port: "3306" ``` ``` defp deps do [ {:phoenix, "~> 1.2.1"}, {:phoenix_pubsub, "~> 1.0"}, {:phoenix_ecto, "~> 3.0"}, {:phoenix_html, "~> 2.6"}, {:phoenix_live_reload, "~> 1.0.1", only: :dev}, {:linguist, "~> 0.1.5"}, {:cowboy, "~> 1.0.0"}, {:postgrex, ">= 0.0.0"}, {:qiniu, "~> 0.3.3"}, {:scrivener, "~> 2.0"}, {:scrivener_ecto, "~> 1.0.2"}, {:bcrypt, github: "chef/erlang-bcrypt"}, {:uuid, github: "okeuday/uuid"}, {:mariaex, ">= 0.0.0"} ] end ```
2 回复
  • tony612 发表
    本地装个 mysql client 试试?
  • bareilles 发表
    https://github.com/phoenixframework/phoenix/issues/1747 和这个问题差不多啊,本地装下mysql,然后系统路径里加下应该就行了。