Anandh L.v
Anandh L.v

Reputation: 95

How to access mysql database from one server to another server

I am new Ruby on Rails. I need to access mysql database of one server (For example, xxx.xxx.xx) to another server (xxx.xxx.xx) in ruby on rails. is this possible in ruby script? Can you anybody guide me?

Upvotes: 0

Views: 235

Answers (1)

nkm
nkm

Reputation: 5914

You just need to mention host and port in your database.yml file.

production:
  adapter: mysql
  database: databasename
  username: username
  password: password
  host: xx.xx.xx.xx
  port: 3306

Upvotes: 1

Related Questions