# Instant Rails not finding database

**URL:** <https://www.ruby-forum.com/t/instant-rails-not-finding-database/99107>\
**Category:** Rails\
**Created:** [July 20, 2006, 10:14am UTC](https://www.ruby-forum.com/t/instant-rails-not-finding-database/99107 "2006-07-20T10:14:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/bb73d2/32.png) [@xia](https://www.ruby-forum.com/u/xia)\
**Post date:** [July 20, 2006, 10:14am UTC](https://www.ruby-forum.com/t/instant-rails-not-finding-database/99107/1 "2006-07-20T10:14:57Z")

</div>

Hey there

I’ve got instant rails installed, and it’s phpmyadmin can find the  
database at the ascribed mysql port (3210)

…however, altho i have got my ‘depot\_development’ db in there (along  
with the other dbs that ship with instant rails)… the rake script from  
the instant rails command interface cant find ‘depot\_development’.

Looking at trace it is ok to connect, but it says the db isn’t there.  
'rake aborted! #42000Unknown database ‘depot\_development’

any clues?

the fact that it connects actually seems a little strange since  
phpmyadmin wouldn’t connect with a password, but my rails app ‘depot’  
requires it.

thanks,

3210

---

<div class="post-metadata">

**Author:** ![xia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/bb73d2/32.png) [@xia](https://www.ruby-forum.com/u/xia)\
**Post date:** [July 20, 2006, 10:37am UTC](https://www.ruby-forum.com/t/instant-rails-not-finding-database/99107/2 "2006-07-20T10:37:17Z")

</div>

Ok, to add to this, i suspect that i need to let my instant rails app  
know that it needs to access mysql via the non default port. I have set  
this up in the instant rails/mysql config file, (which is why phpmyadmin  
is connecting to it), however i think i may need to also define this in  
the app database.yml config file as well… i tried adapter: mysql:3210  
but it didn’t work (reported error adapter doesnt exist)… i also tried  
setting host: localhost:3210 but that reported no address associated  
with host name (even tho instant rails mysql is set to port=3210)  
any ideas?

xia wrote:

> Hey there
> 
> I’ve got instant rails installed, and it’s phpmyadmin can find the  
> database at the ascribed mysql port (3210)
> 
> …however, altho i have got my ‘depot\_development’ db in there (along  
> with the other dbs that ship with instant rails)… the rake script from  
> the instant rails command interface cant find ‘depot\_development’.
> 
> Looking at trace it is ok to connect, but it says the db isn’t there.  
> 'rake aborted! #42000Unknown database ‘depot\_development’
> 
> any clues?
> 
> the fact that it connects actually seems a little strange since  
> phpmyadmin wouldn’t connect with a password, but my rails app ‘depot’  
> requires it.
> 
> thanks,

---

<div class="post-metadata">

**Author:** ![xia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/bb73d2/32.png) [@xia](https://www.ruby-forum.com/u/xia)\
**Post date:** [July 20, 2006, 4:17pm UTC](https://www.ruby-forum.com/t/instant-rails-not-finding-database/99107/3 "2006-07-20T16:17:25Z")

</div>

This is from memory (I’m traveling and don’t have access to my  
development  
machine), but hopefully I’ll get it right…

Edit the MySQL configuration through the Instant Rails manager app using  
the  
menu command “I\>\>Configure\>\>MySQL”. Add “port=3210” and save the config  
file.

Then edit config\database.yml file for your Rails app and immediately  
after  
the line “host: localhost”, add a new line that reads “port:3210”. It is  
important to use the same indentation as the host line and to use space  
characters, not tabs.

Good luck,  
Curt

---

<div class="post-metadata">

**Author:** ![xia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/bb73d2/32.png) [@xia](https://www.ruby-forum.com/u/xia)\
**Post date:** [July 21, 2006, 1:22am UTC](https://www.ruby-forum.com/t/instant-rails-not-finding-database/99107/4 "2006-07-21T01:22:53Z")

</div>

Thanks Curt, I was so close!

editing the database.yml to add the line “port: 3210” (with the space)  
straight after the line “host: localhost” worked. Your help is much  
appreciated.

Curt H. wrote:

> This is from memory (I’m traveling and don’t have access to my  
> development  
> machine), but hopefully I’ll get it right…
> 
> Edit the MySQL configuration through the Instant Rails manager app using  
> the  
> menu command “I\>\>Configure\>\>MySQL”. Add “port=3210” and save the config  
> file.
> 
> Then edit config\database.yml file for your Rails app and immediately  
> after  
> the line “host: localhost”, add a new line that reads “port:3210”. It is  
> important to use the same indentation as the host line and to use space  
> characters, not tabs.
> 
> Good luck,  
> Curt
