# Yet another MySQL issue on WinXP

**URL:** <https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068>\
**Category:** Ruby\
**Created:** [August 1, 2009, 3:16pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068 "2009-08-01T15:16:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@mmx](https://www.ruby-forum.com/u/mmx)\
**Post date:** [August 1, 2009, 3:16pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068/1 "2009-08-01T15:16:07Z")

</div>

I know that my questions will NOT be answered even thogh are pretty  
simple for some guru guys like you…

I hope is posted in the correct section…

Like a classic n00b I followed a video tutorial to install ruby, rails,  
gem etc…Is the classic tutorial by Kevin S…

He teaches it in his MAC so some things are a bit different there…

In a step he installs MySQL and somehow he connects it to Ruby!

I could not even write in CMD mysql -version and get an answer… Finally  
I did it by reading another topic in the forum…

But I still get error when I try to browse my project…  
“We’re sorry, but something went wrong.”  
“We’ve been notified about this issue and we’ll take a look at it  
shortly.”

I attached the development log…

It says something about sqlite… Probably it tries to find something  
different than mysql?

How to I make knows that it needs mysql?

I am curious if someone can make a noob like me to get this work!

Good luck!

---

<div class="post-metadata">

**Author:** ![mmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@mmx](https://www.ruby-forum.com/u/mmx)\
**Post date:** [August 1, 2009, 3:30pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068/2 "2009-08-01T15:30:50Z")

</div>

> I attached the development log…
> 
> It says something about sqlite… Probably it tries to find something  
> different than mysql?
> 
> How to I make knows that it needs mysql?

If you’re using mysql, you should have the following in your  
config/database.yml:

development:  
adapter: mysql  
server: localhost  
user: [your username]  
password: [your password]  
database: [database name]

Rails uses sqlite3 by default so if you don’t have it your app won’t  
start  
properly.

---

<div class="post-metadata">

**Author:** ![mmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@mmx](https://www.ruby-forum.com/u/mmx)\
**Post date:** [August 1, 2009, 4:00pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068/3 "2009-08-01T16:00:01Z")

</div>

I just recreate a new my\_app project like this…

rails my\_app -d mysql

So in the database.yml was those…

# MySQL. Versions 4.1 and 5.0 are recommended.

# 

# Install the MySQL driver:

# gem install mysql

# On Mac OS X:

# sudo gem install mysql – --with-mysql-dir=/usr/local/mysql

# On Mac OS X Leopard:

# sudo env ARCHFLAGS=“-arch i386” gem install mysql –

–with-mysql-config=/usr/local/mysql/bin/mysql\_config

# This sets the ARCHFLAGS environment variable to your native

architecture

# On Windows:

# gem install mysql

# Choose the win32 build.

# Install MySQL and put its /bin directory on your path.

# 

# And be sure to use new-style password hashing:

# [http://dev.mysql.com/doc/refman/5.0/en/old-client.html](http://dev.mysql.com/doc/refman/5.0/en/old-client.html)

development:  
adapter: mysql  
encoding: utf8  
reconnect: false  
database: my\_app\_dev  
pool: 5  
username: root  
password:  
host: localhost

# 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  
reconnect: false  
database: my\_app\_test  
pool: 5  
username: root  
password:  
host: localhost

production:  
adapter: mysql  
encoding: utf8  
reconnect: false  
database: my\_app\_production  
pool: 5  
username: root  
password:  
host: localhost

I just set a password and the database I made it “test”…

I think I am missing something on the comments that says about mysql  
installation on windows…

“#Install MySQL and put its /bin directory on your path.”

It means to put the “D:\Program Files\MySQL\MySQL Server 5.1\bin” in  
what path?

THanks!

PS I attached a new log that may helps!

---

<div class="post-metadata">

**Author:** ![mmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@mmx](https://www.ruby-forum.com/u/mmx)\
**Post date:** [August 1, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068/4 "2009-08-01T18:31:05Z")

</div>

On Aug 1, 10:16 am, Perdikis P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In a step he installs MySQL and somehow he connects it to Ruby!
> 
> It says something about sqlite… Probably it tries to find something  
> different than mysql?
> 
> How to I make knows that it needs mysql?
> 
> I am curious if someone can make a noob like me to get this work!

Please follow this tutorial:

[http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-mysql/](http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-mysql/)

has been created for people getting started with Ruby and Rails on  
Windows.

Also, you need to use MySQL 5.0, not 5.1, since the mysql Ruby  
bindings are going to fail, read the post details.

HTH,

---

<div class="post-metadata">

**Author:** ![mmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@mmx](https://www.ruby-forum.com/u/mmx)\
**Post date:** [August 1, 2009, 6:45pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068/5 "2009-08-01T18:45:39Z")

</div>

Thanx man for the help!

I m going right now to read it!

Thanx again so much!

---

<div class="post-metadata">

**Author:** ![mmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@mmx](https://www.ruby-forum.com/u/mmx)\
**Post date:** [August 1, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068/6 "2009-08-01T16:46:02Z")

</div>

Let me notice some things that may are not right…

THose are my install dirs…

D:\Ruby  
D:\Gems  
D:\Sites  
D:\Program Files\MySQL

Thanx!

---

<div class="post-metadata">

**Author:** ![mmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@mmx](https://www.ruby-forum.com/u/mmx)\
**Post date:** [August 1, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/yet-another-mysql-issue-on-winxp/173068/7 "2009-08-01T20:18:54Z")

</div>

Hello again!

I just wanted to say thank you one more time!

I followed the link and everything was so clear! I managed to get it  
work!

Thank you!
