1

I have just started out on rails and I've been using the mysql2 gem with it. I realised that on rails, migrations are used to alter tables in the database.

So I was just wondering if there was anyway I could view the tables in Mysql? And also some way to make insertions, deletions etc more efficient?

1
  • Rails has a lot of smart people working on making the insertions, deletions, etc work. Any reason you want to go outside of the Rails framework? I'm all for learning more about MySQL and interacting with it manually, but if you're going to use Rails, use the stuff it gives you. Nov 3, 2012 at 20:27

2 Answers 2

5

In your rails directory, you can use the shell command rails dbconsole to connect directly to the database using your rails project's configuration, and write raw SQL in the shell.

1
  • There are also many GUI clients available. sequelpro.com is a good one if you're on a mac. Nov 3, 2012 at 20:26
1

You can use the mysql client to interact with mysql databases. I would start by reading the documentation at mysql.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.