activerecord-jdbc-adapter
activerecord-jdbc-adapter copied to clipboard
Help needs: MySQLNonTransientConnectionException
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.