How to add second mysql server with installed WAMP

Because I started  learning Ruby on Rails I needed to run some database server for ruby. I like mysql.  I developing web aplications with WAMP (Windows + Apache + Mysql + PHP). So i tried to run Ruby on Rails with pre-installed version of mysql 5.1.33 but Rails didn’t work properly. I tried to find how to fix the problem bud it seems that Ruby on Rails has  some problems with mysql 5.1.33.

So i refused SQLite and PostgreSQL for my personal reasons, than only one option left, another mysql server. I downloaded mysql server 5.0. run installation and than configuration that failed in last item (security settings). But mysql server worked quite well.

I was wondering if Rails are going to accept another sqlserver. It didn’t let use say it did but i forget set different port to mysql server 5.0. So i had an idea that this port problem can cause the security problem. So i run configuaration tools set port to 3309 and click to final step and security problem appeared again.Never mind I thought. I added a line port: 3309 as you can see below,

development:
adapter: mysql
encoding: utf8
reconnect: false
database: blog_development
pool: 5
username: root
password: my_passwd
host: localhost
port: 3309

to database.yml in config folder of my project and run rake db:create.

Rails worked fine and WAMP too :).

So in short, you only need to set a different port to run 2 mysql servers at one pc.

PS: It may occur Error mesage  like:’ libmySQL.dll missing ‘ or something like that. You will fix this by copy libmySQL.dll from installed mysqlServer 5 directory (installedpath/mysql server 5.0/bin) to your ruby directory (installedpath/ruby/bin).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.