activerecord-jdbc-adapter icon indicating copy to clipboard operation
activerecord-jdbc-adapter copied to clipboard

Help needs: MySQLNonTransientConnectionException

Open Danissss opened this issue 5 years ago • 0 comments

Hi, thank you for your work about the library.

I was trying to connect the MySQL database inside docker (jruby -S bundle exec rake db:migrate RAILS_ENV=production), but got error com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.

Here is my database.yml

production:
  adapter: mysql2
  encoding: utf8
  collation: utf8_unicode_ci
  host: 127.0.0.1
  port: 3306
  reconnect: true
  database: shirmlab
  pool: 8
  username: shirmlab
  password: nT3Q=HNwXm6EU

I can login to MySQL console with password nT3Q=HNwXm6EU

mysql -u shirmlab -h 127.0.0.1 -p

My based docker image is ubuntu 20:04

Thank you for your help.

Danissss avatar Sep 25 '20 15:09 Danissss