Search code examples
mysqlruby-on-railsmamp

Using Ruby with MySQL installed via MAMP


I'm a newbie. Here's 3 questions. Thank you.

1) If I have MySQL installed through MAMP on my Mac, can I use the MySQL in Ruby applications (i.e. if I install Ruby of course).

My understanding was that MAMP was a php/mysql package so I wouldn't know how to use Ruby with it. i.e. obviously no PHPMyAdmin for Ruby..

2) Should I do a separate install of MySQL to use with Ruby?

3) If I do need a separate install of MySQL, how do I let the computer know which I am trying to use if I make a database in the command line for example?


Solution

  • 1) Yes you can, just point to the proper socket. And Ruby is already setup on Mac. So you can have your PhpMyAdmin but I'd go for Sequel Pro.

    2) Not mandatory, if you go this way, install brew first and set it up through it, it's really easy.

    3) Apps will use sockets or the port you setup. In command line, it would depend on the Path you did setup.