# Problem when changing default sqlite to mysql

**URL:** <https://www.ruby-forum.com/t/problem-when-changing-default-sqlite-to-mysql/140668>\
**Category:** Rails\
**Created:** [June 17, 2008, 10:45am UTC](https://www.ruby-forum.com/t/problem-when-changing-default-sqlite-to-mysql/140668 "2008-06-17T10:45:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [June 17, 2008, 10:45am UTC](https://www.ruby-forum.com/t/problem-when-changing-default-sqlite-to-mysql/140668/1 "2008-06-17T10:45:53Z")

</div>

hi all,  
i installed rails 2.1.0 just now before i was working with rails  
1.2.6. when i try to check the application enviroment link in the index  
page of the application it gave me  
" MissingSourceFile in Rails/infoController#properties  
no such file to load – sqlite3RAILS\_ROOT:  
D:/RadRails/Workspace/Varsha "  
here i am using win XP, no sqlite installed.

i have mysql in my network so i changed (default db sqlite to mysql in  
)the app\_enviroment.rb file of rails gem folder but it’s raised an error  
like…

Errno::EBADF in Rails/infoController#properties  
Bad file descriptor - connect(2)  
RAILS\_ROOT: D:/RadRails/Workspace/Varsha

Application Trace | Framework Trace | Full Trace  
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active\_record/vendor/mysql.rb:111:in  
`initialize’  
…  
…

plz. guide me to solve the above.

thanks in advance  
madhan.

---

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [June 20, 2008, 9:02am UTC](https://www.ruby-forum.com/t/problem-when-changing-default-sqlite-to-mysql/140668/2 "2008-06-20T09:02:11Z")

</div>

Hi Madhan,

My guess is that Rails is trying to connect to your MySql server via a  
socket, which - on Windoze - can be a tad problematic… try  
configuring Rails so that it makes a TCP connection instead, by setting:

host: THE\_NAME\_OF\_YOUR\_WINDOZE\_BOX  
port: 3306

… in your application’s database.yml file.

Good luck,

Peter
