代码之家  ›  专栏  ›  技术社区  ›  Homan

新Phoenix 1.4项目上的Mysql连接错误

  •  0
  • Homan  · 技术社区  · 6 年前

    mix ecto.create

    > mix phx.new vernal --database mysql
    

    > mix ecto.create
    
    15:05:33.863 [error] GenServer #PID<0.223.0> terminating
    ** (RuntimeError) connect raised FunctionClauseError exception.The exception details are hidden, as they may contain sensitive data such as database credentials. You may set :show_sensitive_data_on_connection_error to true if you wish to see all of the details
        (mariaex) lib/mariaex/protocol.ex:1092: Mariaex.Protocol.password/3
        (mariaex) lib/mariaex/protocol.ex:212: Mariaex.Protocol.handle_handshake/3
        (mariaex) lib/mariaex/protocol.ex:171: Mariaex.Protocol.handshake_recv/2
        (db_connection) lib/db_connection/connection.ex:66: DBConnection.Connection.connect/2
        (connection) lib/connection.ex:622: Connection.enter_connect/5
        (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
    Last message: nil
    State: Mariaex.Protocol
    ** (Mix) The database for Vernal.Repo couldn't be created: %RuntimeError{message: "killed"}
    

    我的环境:

    macOS Sierra(版本10.12.6)

    mysql --version
    mysql  Ver 8.0.11 for macos10.13 on x86_64 (MySQL Community Server - GPL)
    

    iex --version
    Erlang/OTP 21 [erts-10.2.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]
    
    IEx 1.8.0 (compiled with Erlang/OTP 21)
    
    mix phx.new --version
    Phoenix v1.4.0
    
    mix.lock has "mariaex": "0.9.1"
    

    有什么想法吗?

    0 回复  |  直到 6 年前
        1
  •  0
  •   Olufemi Ayodele    4 年前

    有人还在查吗?

    https://github.com/elixir-ecto/myxql

    def deps() do
     [
       {:myxql, "~> 0.4.0"}
     ]
    end