Getting Username, Password and DB Being Presently Used

What is the easiest way to get the present username, password and db
name being used? Is this info being stored in an object?

I want the information to run a mysql command to export data onto
server using system("')

Thanks :slight_smile:

–
John K.
[email protected]

http://www.kopanas.com

http://www.soen.info

ActiveRecord::Base.configurations will return a hash that has the
information you need. ActiveRecord::Base.configurations[‘test’], for
example, will return the DB settings for your test environment.

  • Gabriel

The constant RAILS_ENV has the current environment.

  • Gabriel

ahhh… very cool… now how do I know which environment I am in? :slight_smile:

On 5/28/07, John K. [email protected] wrote:

On 5/28/07, John K. [email protected] wrote:

John K.

–
John K.
[email protected]

http://www.kopanas.com
http://www.cusec.net
http://www.soen.info

–
John K.
[email protected]

http://www.kopanas.com

http://www.soen.info