# Database connection

**URL:** <https://www.ruby-forum.com/t/database-connection/91238>\
**Category:** Rails\
**Created:** [April 5, 2007, 10:14pm UTC](https://www.ruby-forum.com/t/database-connection/91238 "2007-04-05T22:14:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 5, 2007, 10:14pm UTC](https://www.ruby-forum.com/t/database-connection/91238/1 "2007-04-05T22:14:31Z")

</div>

Hallo to all

Ic have a big problem with my database. I have installed ruby on rails  
and the Plug in for Eclipse. I create a database with mysql. But when I  
want do use the database in Eclipse for Rails he says that there is no  
connection to the databse.

development:  
adapter: mysql  
database: familie\_development  
username: root  
password: er90di  
host: localhost

Do I need a Socket or anything else!

PLease help me!

Thank you

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 5, 2007, 10:24pm UTC](https://www.ruby-forum.com/t/database-connection/91238/2 "2007-04-05T22:24:33Z")

</div>

Yeah, It’s most likely to specify a socket to the specific location. And  
that can be done as easy as the following example:

adapter: mysql  
database: familie\_development  
username: root  
password: er90di  
host: localhost  
socket: /usr/mysql/mysql.sock

So specify your location correctly and see if it works…

Good Luck ! ( en de groeten 😉 )

- Jermaine

Harald wrote:

> Hallo to all
> 
> Ic have a big problem with my database. I have installed ruby on rails  
> and the Plug in for Eclipse. I create a database with mysql. But when I  
> want do use the database in Eclipse for Rails he says that there is no  
> connection to the databse.
> 
> development:  
> adapter: mysql  
> database: familie\_development  
> username: root  
> password: er90di  
> host: localhost
> 
> Do I need a Socket or anything else!
> 
> PLease help me!
> 
> Thank you

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 6, 2007, 10:48am UTC](https://www.ruby-forum.com/t/database-connection/91238/3 "2007-04-06T10:48:19Z")

</div>

Is nobody here who can help me or had the same problem?

Please I need help!

MFG Harald

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 5, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/database-connection/91238/4 "2007-04-05T22:45:45Z")

</div>

Sorry but i dont find an file with the ending .sock. I use the mysql for  
windows!

is this file in the direction where the special database is or is it an  
general file for all databases??

Please for reply!

Sorry for my not correct english! gg  
Jermaine wrote:

> Yeah, It’s most likely to specify a socket to the specific location. And  
> that can be done as easy as the following example:
> 
> adapter: mysql  
> database: familie\_development  
> username: root  
> password: er90di  
> host: localhost  
> socket: /usr/mysql/mysql.sock
> 
> So specify your location correctly and see if it works…
> 
> Good Luck ! ( en de groeten 😉 )
> 
> - Jermaine
> 
> Harald wrote:
> 
> > Hallo to all
> > 
> > Ic have a big problem with my database. I have installed ruby on rails  
> > and the Plug in for Eclipse. I create a database with mysql. But when I  
> > want do use the database in Eclipse for Rails he says that there is no  
> > connection to the databse.
> > 
> > development:  
> > adapter: mysql  
> > database: familie\_development  
> > username: root  
> > password: er90di  
> > host: localhost
> > 
> > Do I need a Socket or anything else!
> > 
> > PLease help me!
> > 
> > Thank you

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 6, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/database-connection/91238/5 "2007-04-06T14:59:19Z")

</div>

Hi Harald,

You might want to try posting your question to an Eclipse list.  
Problems  
with setting up / debugging an IDE is not something I’ve seen folks get  
a  
lot of help with here. Sorry I can’t be more help, but I just use a  
regular  
old text editor for Rails development.

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 6, 2007, 2:05pm UTC](https://www.ruby-forum.com/t/database-connection/91238/6 "2007-04-06T14:05:24Z")

</div>

Harald wrote:

> Is nobody here who can help me or had the same problem?
> 
> Please I need help!
> 
> MFG Harald

Connect via a TCP/IP socket, rather than trying to a use a Unix domain  
socket (which don’t exist under Windows). E.g.:

host: localhost  
port: 3306

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 6, 2007, 8:14pm UTC](https://www.ruby-forum.com/t/database-connection/91238/7 "2007-04-06T20:14:55Z")

</div>

Harald wrote:

> Hallo to all
> 
> Ic have a big problem with my database. I have installed ruby on rails  
> and the Plug in for Eclipse. I create a database with mysql. But when I  
> want do use the database in Eclipse for Rails he says that there is no  
> connection to the databse.
> 
> development:  
> adapter: mysql  
> database: familie\_development  
> username: root  
> password: er90di  
> host: localhost
> 
> Do I need a Socket or anything else!
> 
> PLease help me!
> 
> Thank you

There is something screwy with passwords and mysql on windows. A quick  
test. create a MySQL user named Rails with no password that can log in  
only form localhost, and give that user the needed privileges. Then  
take out the passworl line in you database.yml file and change the user  
to Rails. If this solves the problem there is some configuration thingy  
you need to do with MySQL. I’ve just dropped the password for my  
development and test databases, so I don’t remember exactly how to solve  
it.

John M.
