Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8750791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:55:41+00:00 2026-06-13T12:55:41+00:00

I finally got a MySQL database hooked up to a Rails 3.2 app after

  • 0

I finally got a MySQL database hooked up to a Rails 3.2 app after spending half the day figuring it out.

What I don’t understand though is how Rails knows where to find the database?

With the default Sqlite3 it’s easy enough in that it’s embedded in the app so it’s just a matter of specifying the path in the database.yml (db/devlopment.sqlite3).

But, when it’s MySQL, I thought I’d have to specify the path of the database I’d created from the MySQL command line. Turns out I don’t have to, all I have to do is give the name of the database and user login credentials.

So when I run a migration in Rails, how does it know where the database is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:55:42+00:00Added an answer on June 13, 2026 at 12:55 pm

    That’s called a reasonable default. Take a look in your database.yml file, you might find a line like this:

    socket = socket: /tmp/mysql.sock
    

    AFAIK, if that’s not explicitly there, it is used as the default in the absence of other parameters (such as host and port).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've finally got my Rails Todo List app to display the Todos using Backbone's
After many hair-pulling frustrations I've finally got one version of the PerlMagick module working
Alright, I finally got this code to work after hours of toiling: Dim path
I finally got my jQTouch/iPod web app embedding a video . Thanks to Ryan
Finally got my first iPhone app ready for launch. There's a large publisher backing
finally got reg'd as an iOS developer - tried to compile the app i
I finally got apache2 with mod_wsgi working on Linux (havent much luck with windows
I finally got my permalinks working for Custom Post Types and Taxonomies using `
I finally got maps api implemented into jquery accordion, mainly by changing var map;
I finally got Bootstrap tabs to work. I was wondering if there's a way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.