# "getaddrinfo: Name or service not known" error. MySQL drive

**URL:** <https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known-error-mysql-drive/75978>\
**Category:** Rails\
**Created:** [November 14, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known-error-mysql-drive/75978 "2006-11-14T20:35:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tikaro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2acd7d/32.png) [@tikaro](https://www.ruby-forum.com/u/tikaro)\
**Post date:** [November 14, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known-error-mysql-drive/75978/1 "2006-11-14T20:35:48Z")

</div>

Dear list:

I have one app running merrily on a Linux box. I can run “rake  
migrate” on it with no trouble, start it, stop it, and restart it.

I created a second app and uploaded it to the same box. Aside from the  
database names, the database.yml files are _exactly the same_.

## Yet when I run “rake migrate” on the new app, I get:

## (in /home/[USERNAME]/rails/[APPNAME]/releases/20061113210744) \*\* Invoke migrate (first\_time) \*\* Invoke db:migrate (first\_time) \*\* Invoke environment (first\_time) \*\* Execute environment \*\* Execute db:migrate rake aborted! getaddrinfo: Name or service not known /usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/vendor/mysql.rb:108:in `initialize’ …[et cetera]

Can anyone give me a hint where to start to investigate this? Should I  
be updating my Rails, or my MySQL driver? Any pointers in the right  
direction would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![tikaro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2acd7d/32.png) [@tikaro](https://www.ruby-forum.com/u/tikaro)\
**Post date:** [August 28, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known-error-mysql-drive/75978/2 "2007-08-28T17:18:38Z")

</div>

John Young wrote:

> Dear list:
> 
> I have one app running merrily on a Linux box. I can run “rake  
> migrate” on it with no trouble, start it, stop it, and restart it.
> 
> I created a second app and uploaded it to the same box. Aside from the  
> database names, the database.yml files are _exactly the same_.
> 
> ## Yet when I run “rake migrate” on the new app, I get:
> 
> ## (in /home/[USERNAME]/rails/[APPNAME]/releases/20061113210744) \*\* Invoke migrate (first\_time) \*\* Invoke db:migrate (first\_time) \*\* Invoke environment (first\_time) \*\* Execute environment \*\* Execute db:migrate rake aborted! getaddrinfo: Name or service not known /usr/local/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/vendor/mysql.rb:108:in `initialize’ …[et cetera]
> 
> Can anyone give me a hint where to start to investigate this? Should I  
> be updating my Rails, or my MySQL driver? Any pointers in the right  
> direction would be greatly appreciated.

Did you ever get an answer to this?  
I am getting a similar error when I try to do:  
rake db:structure:dump --trace  
(in /home/…)  
\*\* Invoke db:structure:dump (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
\*\* Execute db:structure:dump  
rake aborted!  
getaddrinfo: Name or service not known  
…/vendor/rails/activerecord/lib/active\_record/vendor/mysql.rb:111:in  
`initialize’  
etc.
