Master ruby with us

Posts Tagged ‘database’

Configuration for Oracle with Ruby On Rails on Windows

Posted by firstruby on June 26, 2009

To configure the Oracle with Ruby on Rails (RoR) applications, we need to do following setting,

Download Oracle 10g from (to download Oracle setup, you need to create an account)

Install following gems,

gem install activerecord-oracle_enhanced-adapter
gem install ruby-oci8

Then modify the /config/database.yml as following for the current environment,

adapter: oracle_enhanced
host: localhost
username: db_user_name
password: db_password
encoding: utf8


Posted in firstruby, Useful Links | Tagged: , , | Leave a Comment »

Reset MySQL password on Windows

Posted by firstruby on October 26, 2008

1) Log in as Administrator.

2) Stop the MySQL service. Go to Start menu > Control Panel > Administrative Tools > Services > Stop MySQL service.

3) Create “mysql-init.txt” file with following 2 lines,

UPDATE mysql.user SET Password=PASSWORD(‘mypassword’) WHERE User=’root’;

4) Open command prompt, and give following command to reset MySQL password,

“C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt” –defaults-file=”C:\Program Files\MySQL\MySQL Server 5.0\my.ini” –init-file=C:\\mysql-init.txt

The appropriate –defaults-file setting can be found using the Services Manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list, right-click it, and choose the Properties option. The Path to executable field contains the –defaults-file setting.

5) After the server has started successfully, delete C:\mysql-init.txt

Posted in Useful Links | Tagged: , | 1 Comment »