Reputation: 8631
I just cloned a repo from github and bundle installed everything and created a mysql db via rake db:create. I migrated the database and everything....however, I have no idea where it is located? Usually when I use sqlite, it's in the db/ folder...but this database is not. where can I find it?
Upvotes: 1
Views: 495
Reputation: 5508
MySQL works a bit differently than sqlite. Whereas sqlite writes a database directly to a file (in your db/ directory in the case of rails), MySQL writes it to a server (usually located on the same machine as your application, but not always). I would be surprised if an app you cloned off of github let you create a mysql database right off the bat. You need to set up a mysql server and set a password for it. If you're running Ubuntu -- as I am -- these are some good instructions. Then you need to configure your config/database.yml
file accordingly.
Upvotes: 0
Reputation: 230346
Look in your MySQL config file. Usually it's called my.cnf
. Where to find this config on your system, we can't say :-)
Look for datadir
in a config file
[mysqld]
datadir=/var/lib/mysql/
Upvotes: 2