For my project I am trying to make a connection to a remote database with Rails 4.
I modified the database.yml
file and it looks so:
development:
adapter: mysql2
reconnect: false
encoding: utf8
database: <name_DB>
username: <user_DB>
password: <pass_DB>
host: 127.0.0.1
port: 3307
pool: 5
I got this error:
Mysql2::Error
Lost connection to MySQL server at 'reading initial communication packet', system error: 0
timeout: 5000
-I don't have any model until now.
-gem 'mysql2' already installed
-A connection through SSH works and also with MySQL workbench.
Am I missing something? How can I achieve the connection? Should I modify something else?