Mysql with Rubymine

Very basic Question. I have Rubymine 3 on my Mac OSX 10.6 and I have mysql isntalled. I am using RVM for my ruby installation and I can genearate a rails project but I am lost with mysql. I have the database navigator plugin because I thought i t would help. Is there a basic 1,2 ,3 tutorial for getting started with mysql and rails - I can start and stop my mysql server but I am not sure how to connect to it

Will database navigator help? if so how do I set it up?
Any other basic mysql suggestion?

Tom Brooke

4 comments
Comment actions Permalink

Hello Tom,

I have Rubymine 3 on my Mac OSX 10.6 and I have mysql isntalled. I am using RVM for my ruby installation and I can genearate a rails project but I am lost with mysql.
...
I can start and stop my mysql server but I am not sure how to connect to it

Is "mysql" rubygem gem is also installed? If yes, check that "config/database.yml" file describes connection to your MySql database. Then you need to launch mysql server manually. If databases mentioned in database.yml aren't already created you need to launch "db:create" rake task (e.g. using RubyMine | Tools | Run Rake Task...). Then launch "db:migrate" task and finally all should work.

Will database navigator help? if so how do I set it up?


Navigator wont help with your previous issue, but may be useful in general. It provides some UI for working with databases, just an alternative to external database viewers. At first you need to download mysql jdbc driver (e.g. at http://www.mysql.com/products/connector). Then in "RubyMine | Db Navigator | Settings | Connections" you can setup new connection using the driver.

0
Comment actions Permalink

Still don't get the MySql Connection

I have Mac OS X  10.6.6

My sql admin shows MySQL server running on localhost:3306   user root

Rubmine data Source Properties shows

           JDBC Files
               mysql-connector-java-5.1.12-bin.jar

           JDBC Driver Class
               com.mysql.jdbc.driver

Database URL:
   jdbc://localhost:3306


I get the message Incorrect driver and/or connection setting specified

Not sure how to fix

I am trying to deveolop a rails 3 app and have all the gems loaded

Thank You for any help

Tom Brooke

0
Comment actions Permalink

Me too - all I get is "Connection invalid - unknown reason".

System: Ubuntu 10.10
Driver lib: /usr/share/java/mysql-connector-java.jar (package "libmysql-java")
Driver: com.mysql.jdbc.Driver
URL: jdbc://localhost:3306
User: ...
Passwd: ...


UNKNOWN reason??? Oh please... all works fine on the command line.

I use mysql2 gem and Rails 3.0.4, but that should have nothing to do with the JDBC connection.

0
Comment actions Permalink

URL should be

jdbc:mysql://localhost:3306

0

Please sign in to leave a comment.