# mysql starts then stops



## kendeb1 (Dec 13, 2007)

I am using mysql as a dbase for a beginning coldfusion application.
I managed to get mysql up and running on my mac g4 running 10.4.10 and it has been stable and responsive to navicat, terminal and coldfusion 8 for several months.
Several days ago when I tried to start the mysql server i received:

Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/usernames-powerbook-g4-15.local.pid
071213 21:47:28  mysqld ended

I have been unsuccessful in finding the pid file or resolving this issue.  I thought about copying the db file and starting over but have spent entirely too much time getting connections to coldfusion working etc.
In addition, I am seriously unix challenged, so any help needs elementry step-by-step instructions.
In short, I have made too much progress to trash my setup now.
In advance thanks for any help you can offer.


----------



## tomdkat (Dec 14, 2007)

Look in /usr/local/mysql/data for a file called "{hostname}.err" where "hostname" will be the hostname of your Mac.  For example, if your Mac is named "bob" the error log will be "bob.err".  Look at the bottom of that file to see what problem MySQL encountered that caused it to stop.

Peace...


----------



## kendeb1 (Dec 15, 2007)

Thanks for getting back to me.  I apologige for the delay getting back to you.
I cd'ed into the data directory only to get permission denied.  Then I cd'ed into the data directory by running a "ls" from the mysql directory.
Here's what I got:

ken-deblieus-powerbook-g4-15:~ kendeblieu$ cd /usr/local/mysql/
ken-deblieus-powerbook-g4-15:/usr/local/mysql kendeblieu$ ls
COPYING                 data                    scripts
EXCEPTIONS-CLIENT       docs                    share
INSTALL-BINARY          include                 sql-bench
README                  lib                     support-files
bin                     man                     tests
configure               mysql-test
ken-powerbook-g4-15:/usr/local/mysql kendeblieu$ cd /data/
ken-powerbook-g4-15:/data kendeblieu$ ls
OWS.mdb
ken-deblieus-powerbook-g4-15:/data kendeblieu$ ls -a
.       ..      OWS.mdb

What's next?
Ken


----------



## cfr (Apr 24, 2008)

Did you sort this out?

The problem is that "cd /data/" tries to change you into a directory named "data" at the root level - not /usr/local/mysql/data.

To access the data directory, you will need to issue "sudo cd /usr/local/mysql/data" while logged in as an admin. It will ask for your password. You will probably need to use sudo to read the error log, too.

When you have finished using sudo, type "sudo -k" to end the authorisation. (It will time out anyway, but it is safer not to wait.)

Be careful with sudo - it allows you to issue any command as though you were the root or superuser. You could, for example, delete everything on your hard drvie including the OS itself.

Hope you solved this before now, but maybe somebody will find this helpful...

- cfr


----------



## kendeb1 (Apr 26, 2008)

cfr,
Yes I did get it running again but had to remove the app and rebuild the dbase.
It wasn't a big job, but irritating anyways.
I think I deleted a app file while doing a clean-up.
At any rate, mysql is stable and running now.
Thanks for getting back to me.  I'll keep your reply filed in case the problem happens again.
kad


----------

