|
|
MySQL is dead?
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
Um, I can't start the MySQL server... I followed these instructions, but when I try to start the server I get
"Starting mysqld daemon with databases from /usr/local/mysql/data
040407 18:00:28 mysqld ended
[1]+ Done sudo ./bin/mysqld_safe"
And the tutorial said to look at my .err file in /usr/local/mysql/data.. So I did.
It says
"040407 18:00:28 mysqld started
040407 18:00:28 Can't start server : Bind on unix socket: Permission denied
040407 18:00:28 Do you already have another mysqld server running on socket: /t
mp/mysql.sock ?
040407 18:00:28 Aborting
040407 18:00:28 /usr/local/mysql/bin/mysqld: Shutdown Complete
040407 18:00:28 mysqld ended"
I don't have root enabled on my computer, and I was thinking that might be the problem...
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by Jaey:
I don't have root enabled on my computer, and I was thinking that might be the problem...
By default MySQL runs on port 3306 which is not a privileged port.
I don't have root enabled and am running MySQL on several machines with no issues.
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by Jaey:
So what can I do...?
From the terminal type:-.
ps -ax | grep mysql
You should see (hopefully) only one entry that reads something like:-
6585 std U+ 0:00.01 grep mysql
If, however, you see more than that line, take note of the PID (process ID) and then proceed to kill them, one by one:-
sudo kill [insert id here]
It's more than likely that MySQL hasn't properly died, and it's still got a lock. This will really get rid of it for sure!
Now restart your mysql server:-
cd /usr/local/mysql (or whatever your install directory is)
sudo ./bin/mysqld_safe -umysql &
...and away you go...
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
I get
2129 std R+ 0:00.00 grep mysql
Then when I restarted the server, I got
Starting mysqld daemon with databases from /usr/local/mysql/data
040408 01:05:00 mysqld ended
...
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
MySQL has to be started using root. You do not have to have the root account enabled, you simply have to prefix the command with sudo. It will then ask you for your administrator password.
After this there are still a whole number of possible issues you could run into... you might want to read the instructions with a better eye for detail... *hint* *hint*
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
I've been using sudo...
Originally posted by larkost:
*hint* *hint*
Meaning the "Database Re-Initialization" part? That doesn't help either.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by Jaey:
I've been using sudo...
Meaning the "Database Re-Initialization" part? That doesn't help either.
No worries, next thing to check is the error log - it will probably be in /usr/local/mysql/data called 'localhost.err' or something similar (as long as it has the .err) - you'll need to be 'su' or do a 'sudo' to get into that directory.
Post the last 10-20 lines of that log and we'll see what the problem is
Also, before you go too far, try removing the '.pid' file from the /usr/local/mysql/data directory and try restarting MySQL - sometimes that can stop MySQL from starting if it wasn't shut down correctly.
Cheers
(BTW - the 'hint' from larkost was to RTFM
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
failing to get it running, there is a package installer for OS X here:
http://www.serverlogistics.com/mysql.php
Plus it adds a pref panel to your System Preferences, so you can initialize, start, stop, and change root password easily.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
127.0.0.1.err says:
"040408 16:20:27 mysqld started
040408 16:20:27 Can't start server : Bind on unix socket: Permission denied
040408 16:20:27 Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
040408 16:20:27 Aborting
040408 16:20:27 /usr/local/mysql/bin/mysqld: Shutdown Complete
040408 16:20:27 mysqld ended"
I don't see any .pid's in /usr/local/mysql/data...
madmacgames: I'll try that... see what happens
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
Um, I tried madmacgames' thing, and it didn't do anything... maybe I should completely wipe MySQL off of my hard drive and start from scratch?
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by Jaey:
Um, I tried madmacgames' thing, and it didn't do anything... maybe I should completely wipe MySQL off of my hard drive and start from scratch?
Now where's the fun in that?
try:-
sudo rm /tmp/mysql.sock
and then restarting mysql
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
rm: /tmp/mysql.sock: No such file or directory
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Originally posted by Jaey:
rm: /tmp/mysql.sock: No such file or directory
Methinks therein lies the problem. Unless you've changed where the mysql socket is located, anyway.
What happened to me a few months ago, is that I installed a more recent version of MySQL on top of an already running version (forgot to stop it - eejit, I know). I had this exact same problem, and so had to uninstall mysql and then re-install. Less fun, I know - but did the trick.
It may also be something to do with cron scripts cleaning out your tmp folder and therefore your mysql socket, but I'm not sure (and far to many pints is making me less sure....)
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
Originally posted by Black Book:
I had this exact same problem, and so had to uninstall mysql and then re-install. Less fun, I know - but did the trick.
Um yeah, that did nothing
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
And nobody has any ideas?
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by Jaey:
And nobody has any ideas?
Have you manually rebooted your machine before trying any of these commands?
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
Originally posted by Simon Mundy:
Have you manually rebooted your machine before trying any of these commands?
Yes.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
...and you've definitely started MySQL as root? (i.e. sudo ./bin/mysqld_safe -umysql & )
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
Originally posted by Simon Mundy:
...and you've definitely started MySQL as root? (i.e. sudo ./bin/mysqld_safe -umysql & )
Starting mysqld daemon with databases from /usr/local/mysql/data
040412 21:48:48 mysqld ended
[1]+ Done sudo ./bin/mysqld_safe -umysql
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by Jaey:
...ok.. NEXT thing to try is fixing your permissions:-
sudo chown -R mysql:mysql /usr/local/mysql/*
and then try restarting it - in a lot of cases if there are files that mysql can't get exclusive access to, it will fall over.
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Is it still not working?
If not, have a look here for a few pointers.
Anyhoo, if you still can't get it working, I think we're going to need some more detailed info.
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|