From: Chris Kottom Date: 2011-02-20T00:32:46+09:00 Subject: Re: Work with MySQL database --20cf305644b189ce53049ca457c5 Content-Type: text/plain; charset=UTF-8 Previous respondent is right about mysql2 gem. To get a yes/no answer about whether the setup is valid and works with Rails, I would do it like this. # assuming you've got Rails 3 installed sudo gem install mysql2 rails new test_app -d mysql cd test_app ruby -i.bak -pe 'gsub(/password:/, "password: ")' config/database.yml rake db:create rails dbconsole Enter your MYSQL ROOT PASSWORD string when prompted, and if you get a mysql prompt, you're good. There's probably a way to do this in fewer keystrokes, but this will definitely tell you whether you're OK within a minute or so. On Sat, Feb 19, 2011 at 3:27 PM, andrew mcelroy wrote: > On Sat, Feb 19, 2011 at 5:12 AM, Manny 777 wrote: > > > Hi there, > > I'm new in RoR and I would like to ask you for help, how to check if > > the MySQL database works. I installed MySQL database with gem following: > > > > sudo env ARCHFLAGS="-arch i386" gem install mysql -- \ > > --with-mysql-dir=/usr/local/mysql > > --with-mysql-lib=/usr/local/mysql/lib \ > > --with-mysql-include=/usr/local/mysql/include > > > > And everything went ok, no error or warning message. > > > > But now - I don't know, how to fast check that the MySQL database is > > installed ok - exist any command to terminal for this? Or any tutorial, > > how to check it? > > > > For PHP exist for manage of MySQL database PHPMyAdmin - exist something > > similar for Ror? I found rbDB, but it looks that the project is death... > > > > Thank you a lot for your time. :) > > [I'm working with terminal in Mac OS x] > > > > what you are asking is actually 3 questions. > > If you are on a mac, then just use sequel pro to admin mysql. > As for using mysql with ruby, mysql2 gem is better than mysql gem. > Read the documentation on mysql2 gem. > > Andrew McElroy > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > --20cf305644b189ce53049ca457c5--