Installing mySQL 5.0.27 on OS X 10.4.8
I'm on page number 29 in "Build Your Own Ruby on Rails Web Application" where Patrick is instructing us on how to install mySQL. I've downloaded the current stable release of mySQL, run the mysql-standard-5.0.27-osx10.4-powerpc.pkg and was told that the installation was successful. Here is my concern:
I remember many months ago when I was fooling around with PHP and I recall installing multiple versions of PHP and mySQL on my machine. I remember specifically using Marc Liyanage's packages available on www.entropy.ch as well as MAMP.
Now, when I execute the following commands as per Patrick's instructions, I receive errors.
From the book:
This is returned:
Excellent. Next, we need to start the server—we’ll do this manually for now.
Open a Terminal window and enter the following command:
$ sudo /usr/local/bin/mysqld_safe5
Included in my mysql-standard-5.0.27-osx10.4-powerpc.dmg file is a ReadMe.txt, which provides a different command for connecting to the mySQL server. That is:
sudo: /usr/local/bin/mysqld_safe5: command not found
Which after entering that, I receive:
$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
And yay, the server appears to have been started!
Starting MySQL database server
This is where things start getting confusing for me
Now Patrick says:
When I press Control-Z and enter 'bg', the message returned to me is:
Once MySQL is running, you can tell it to run in the background by hitting Ctrl-
Z, then entering this command:
Hmm. Does that mean mySQL really isn't running? Also, what does pressing Control-Z do? Anything special? How do I know that whatever it's supposed to do is actually being done? Should something indicate that it's been pressed?
-bash: bg: current: no such job
Not knowing what to do, I proceed with his further instructions to:
Running that command returns this:
...close the Terminal window; MySQL will continue to run as a server
on your system. Now, all that’s left to do is confirm that the MySQL server is
indeed running as expected. In your Terminal window, type the following:
$ ps -ax | grep mysql
This command should return a few processes that relate to MySQL.
Since I'm new to all of this, I can't tell if that's good or bad or if that means mySQL is actually running or it isn't. It does at least appear to show the processes that are running, like he said. Does anyone know if mySQL is actually running though?
4903 p1- S 0:00.04 /bin/sh ./bin/mysqld_safe --datadir=/usr/local/mysql/
4922 p1- S 0:05.15 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysq
7260 p1 R+ 0:00.00 grep mysql
He goes on to say:
I figure, since it does return some processes, like he said it would, it's ok to try that command out. But, oh noes! This is what happens when I do:
If it does, you can try to connect to your database with the following
This should present you with a mysql>
So, just out of curiosity, I decide to look in /usr/local/bin/ where apparently this thing belongs, but it isn't there!
-bash: mysql5: command not found
So now I'm at an impasse. I have to wonder, could my previous installations of mySQL be conflicting somehow with my recent one? Why isn't mysql5 in /usr/local/bin/ and why am I not being presented with a mysql prompt when I enter mysql5 into the command line?
I'm not sure if I should proceed in the book without first working this out as I question whether or not leaving it unresolved could create more problems and confusion for me down the line.