Topic: Database installation problem?

Alrighty, I am on a ppc running osx 10.4

I have currently downloaded Locomotive, and i got pretty far until i realized that i kept getting the error 'sqlite' does not exist?! (I though this came with Locomotive) Anyway, I went and downloaded MySQL and got it running.

Now my problem is, how do i use it? I was following the screencast from Locomotive, to get the ball rolling. And I am stuck at creating the database. I had written a 'myfile.sql' file, within my 'db' directory. In the screencast, they run sqlite < schema myfile.sql (or something similar).

How do I go about doing this with mySql installed?

Thanks so much for the help.

Re: Database installation problem?

You don't need to use any mysql.sql file to connect Rails to mysql.  That's for when you want to load a bunch of earlier-recorded data back into your database.  What you want is to edit config/database.yml to have it connect to mysql. config/database.example.yml should be in there and will help guide you.

good luck!

Re: Database installation problem?

Thanks so much!

let me try this out.

But how do i create a database then?


this is probably dumb. But i installed SQL and i dont even know what happened to it. I cant seem to locate it on my harddisk, maybe im missing something. Either way, i dont know the path or anything to even get my config to point to it. And following that, I dont know how to create a new database file, to insert data into.

Last edited by armyvisual (2007-03-22 20:22:39)

Re: Database installation problem?

You create a database by logging into mysql and making one.

first, type 'mysql' in a console window.  Depending on the username and password you set up for it you might need to specify those like this:

mysql -u myusername -p

and then it'll ask you for your password.  To get full access use the username 'root'.

Then, when you're in, just type "create database whateveryouwanttocallit" and you're set :-)

Re: Database installation problem?

Alrighty, i tried doing that, but i get:

-bash: mysql: command not found

Re: Database installation problem?

If mysql is installed on your system that command should be found.

Do any Mac folks want to jump in here?

Re: Database installation problem?

Hmm. Alrighty.


I just checked the preference panel that came with the installation - it says MySQL sever is up and running!

Well, i followed the installation instructions, and the instructions to start the server. So it must be something im missing or doing incorrectly.

danger - thanks for all the help by the way.

Last edited by armyvisual (2007-03-22 20:32:32)

Re: Database installation problem?

If this gets ignored feel free to start a new post - specifically about managing mysql on a Mac.