# Database.yml, what to change?

**URL:** <https://www.ruby-forum.com/t/database-yml-what-to-change/135551>\
**Category:** Rails\
**Created:** [April 23, 2008, 2:12am UTC](https://www.ruby-forum.com/t/database-yml-what-to-change/135551 "2008-04-23T02:12:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![globalrev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f08c70/32.png) [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Post date:** [April 23, 2008, 2:12am UTC](https://www.ruby-forum.com/t/database-yml-what-to-change/135551/1 "2008-04-23T02:12:11Z")

</div>

exactly what do i need to change? i should set username and password  
to whatever i want?  
or username should be root?  
what exactly do i need to change/set up?

“”"  
You then need to edit the database.yml file (in any text editor) to  
properly link to your database etc. This file can be found in the  
ProjectName\config\ directory. You will be presented with something  
that looks like:

development:  
adapter: mysql  
encoding: utf8  
database: ProjectName\_development  
username: root  
password: your\_password\_here  
host: localhost (modify if needed)

Once all this is set up, you just need to run the command:  
“”"

---

<div class="post-metadata">

**Author:** ![globalrev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f08c70/32.png) [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Post date:** [April 23, 2008, 2:13am UTC](https://www.ruby-forum.com/t/database-yml-what-to-change/135551/2 "2008-04-23T02:13:57Z")

</div>

and what exactly do they mean by this? i should change something here  
or not?

# Warning: The database defined as ‘test’ will be erased and

# re-generated from your development database when you run ‘rake’.

# Do not set this db to the same as development or production.

test:  
adapter: mysql  
encoding: utf8  
database: testproject\_test  
username: root  
password:  
host: localhost

---

<div class="post-metadata">

**Author:** ![globalrev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f08c70/32.png) [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Post date:** [April 23, 2008, 2:18am UTC](https://www.ruby-forum.com/t/database-yml-what-to-change/135551/3 "2008-04-23T02:18:02Z")

</div>

libmysql.dll

the file was not found i get when i run “rake db:create”.

exactly where do i need to run this from. i run it in the folder of my  
project.

---

<div class="post-metadata">

**Author:** ![globalrev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f08c70/32.png) [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Post date:** [April 23, 2008, 8:42am UTC](https://www.ruby-forum.com/t/database-yml-what-to-change/135551/4 "2008-04-23T08:42:34Z")

</div>

On 23 Apr 2008, at 01:13, globalrev wrote:

> and what exactly do they mean by this? i should change something here  
> or not?

It means what it says: don’t set that database to be the same as your  
dev/production database, because it will get erased automatically. You  
do still probably want to change it, just don’t set the database to be  
the same as your production/dev ones.

---

<div class="post-metadata">

**Author:** ![globalrev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f08c70/32.png) [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Post date:** [April 23, 2008, 8:43am UTC](https://www.ruby-forum.com/t/database-yml-what-to-change/135551/5 "2008-04-23T08:43:11Z")

</div>

On 23 Apr 2008, at 01:11, globalrev wrote:

> exactly what do i need to change? i should set username and password  
> to whatever i want?  
> or username should be root?  
> what exactly do i need to change/set up?

It doesn’t matter what database/username/password are, as long as they  
match up with how mysql is setup (ie there is a database of that name  
and the specified user can access it, using the specified password)

Fred
