I’m having trouble connecting to a remote mysql db with mysql2 gem.
I get this error:
Host 'my_ip' is not allowed to connect to this MySQL server
My db.yml says:
remote_development:
adapter: mysql2
reconnect: false
host: host_ip
encoding: utf8
database: host_db
pool: 5
username: root
password:
And when I try to connect via my sql or telnet I have no problems at all. I’ve double and triple checked the data con my yml, but can’t get through this. Any idea?
Btw I’m using Rails 3.2.3, Ruby 1.9.3, and tried mysql2 v 0.2.18 and 0.3.11 … pls HELP!
I solved this, pretty simple…
I just created a new user and password to the db with specific permissions instead of using root 🙂
Should have tried this from the beginning.
I think this is the correct approach.