crystal-lang / crystal-mysql

MySQL connector for Crystal
MIT License
107 stars 36 forks source link

down #27

Closed airinfection closed 7 years ago

airinfection commented 7 years ago

(DB::ConnectionRefused) 0x4b278e: MySql::Connection#initialize:UInt8 at /workspace/myapp/lib/mysql/src/mysql/connection.cr 32:7 0x4b2063: MySql::Connection::new:MySql::Connection at /workspace/myapp/lib/mysql/src/mysql/connection.cr 4:3 0x4b1fcd: MySql::Driver#build_connection:MySql::Connection at /workspace/myapp/lib/mysql/src/mysql/driver.cr 4:5 0x4c4f33: DB::Pool(DB::Connection+) at /workspace/myapp/lib/db/src/db/pool.cr 123:13 0x4c4ea6: DB::Pool(DB::Connection+) at /workspace/myapp/lib/db/src/db/pool.cr 17:34 0x4c3ddc: DB::Pool(T)::new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay<Int32, Int32, Int32, Float64, Int32, Float64, &Proc(DB::Connection+)>:DB::Pool(DB::Connection+) at ?? 0x4ac1bd: DB::Database#initialize<DB::Driver+, URI>:DB::Pool(DB::Connection+) at /workspace/myapp/lib/db/src/db/database.cr 49:7 0x4abfb5: DB::Database::new<DB::Driver+, URI>:DB::Database at /workspace/myapp/lib/db/src/db/database.cr 42:5 0x4a4564: DB::build_database:DB::Database at /workspace/myapp/lib/db/src/db.cr 122:5 0x4a453e: DB::build_database:DB::Database at /workspace/myapp/lib/db/src/db.cr 118:5 0x458ef9: ??? at /workspace/myapp/lib/db/src/db.cr 108:5 0x469679: main at /opt/crystal/src/main.cr 12:15 0x7f713c399830: __libc_start_main at ?? 0x457dd9: _start at ?? 0x0: ??? at ??

bcardiff commented 7 years ago

@airinfection, from the trace it seems that either the connection configuration is wrong or the database server is down.

airinfection commented 7 years ago

My mysql 5.7 server is running. Username, password and host correct. And i am trying example on your doc.

It was working before interesting..

airinfection commented 7 years ago

stopped working with the last release of crystal.

bcardiff commented 7 years ago

@airinfection travis and local are passing with latest crystal version and mysql 5.7. the specs enforce a login with explicit password.

$ crystal --version
Crystal 0.21.0 (2017-02-21)
$ mysql --version
mysql  Ver 14.14 Distrib 5.7.17, for osx10.12 (x86_64) using  EditLine wrapper
$ crystal spec
169 examples, 0 failures, 0 errors, 0 pending

Is there any new information you could provide?

airinfection commented 7 years ago

is that mysql://username:password@localhost/dbname isnt it

airinfection commented 7 years ago

i installed ubuntu 16.10 it magically worked. still trying to understand why the old one did not work. db collation maybe

bcardiff commented 7 years ago

Closing then, but please, reopen if there is any new info to provide.