MySQL 4.0.18 on Mac OS X 10.2.8 won't start
For some reason, MySQL 4.0.18 has suddenly stopped running and will not start anymore. It has been running for several weeks until about 5 days ago. When I tried to reach it, I discovered that it is no longer running. However, attempting to start it via the mysqld_safe script simply returns with: Starting mysqld daemon with databases from /usr/local/mysql/data 060402 18:49:55 mysqld ended [1]Done ./mysqld_safe --user mysql To confirm, the /tmp/mysql.sock file does not exist at this point. Any ideas on how to get this running again? Sachin -- Sachin Petkar Email : [EMAIL PROTECTED]
Re: MySQL 4.0.18 on Mac OS X 10.2.8 won't start
Do you have some sort of visual process manager for Mac OS X that can tell you at a glance if mysqld_safe and mysql server are actually running in memory? Under linux I use a program called qps. http://www.student.nada.kth.se/~f91-men/qps/ You may already have a similar utility to view running processes under Mac OS X. Or there may be something similar you can download for free off the net. You really need some way of verifying that mysqld is actually running in memory, before attempting to connect to it. This is handy for showing running multiple servers, ie when upgrading to a newer version. You can see the port and socket each mysqld is listening to, plus other server directives such as the data directory and PID. I start mysqld directly with a bash shell script: #! /bin/sh # # start the MySQL database server /usr/local/mysql-5.0.18/bin/mysqld \ --defaults-file=/usr/local/mysql-5.0.18/my.cnf \ --port=7000 \ --socket=/var/lib/mysql/mysql.sock \ --pid=/var/lib/mysql/laptop.pid \ --user=mysql \ --datadir=/var/lib/mysql and stop it with: #! /bin/sh # # stop the MySQL database server /usr/local/mysql-5.0.18/bin/mysqladmin shutdown \ -uXX -pXX --socket=/var/lib/mysql/mysql.sock If I don't use the script to pass parameters to mysqld but add them to my.cnf, they will not appear in qps process manager. I have noticed that sometimes mysqld_safe script would start, and be in memory, but the mysqld server was not being loaded into memory for some reason, which obviuosly meant I could not connect to the mysql server. For that reason I no longer use mysqld_safe to start mysqld. HTH Keith In theory, theory and practice are the same; in practice they are not. On Sun, 2 Apr 2006, Sachin Petkar wrote: To: mysql@lists.mysql.com From: Sachin Petkar [EMAIL PROTECTED] Subject: MySQL 4.0.18 on Mac OS X 10.2.8 won't start For some reason, MySQL 4.0.18 has suddenly stopped running and will not start anymore. It has been running for several weeks until about 5 days ago. When I tried to reach it, I discovered that it is no longer running. However, attempting to start it via the mysqld_safe script simply returns with: Starting mysqld daemon with databases from /usr/local/mysql/data 060402 18:49:55 mysqld ended [1]Done ./mysqld_safe --user mysql To confirm, the /tmp/mysql.sock file does not exist at this point. Any ideas on how to get this running again? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL 4.0.18 on Mac OS X 10.2.8 won't start
Here are some screen snapshots of qps showing mysql server running on my machine. I tries to post these to the list, but they went over the file size limit for the mailing list. Showing mysql running in memory without using mysqld_safe script: http://www.karsites.net/KAR/websites/pub/computing/mysql-running/mysqld1.jpg First part of command-line parameters passed to mysqld: http://www.karsites.net/KAR/websites/pub/computing/mysql-running/mysqld2.jpg Second part of command-line parameters passed to mysqld: http://www.karsites.net/KAR/websites/pub/computing/mysql-running/mysqld3.jpg Regards Keith In theory, theory and practice are the same; in practice they are not. On Sun, 2 Apr 2006, Sachin Petkar wrote: To: mysql@lists.mysql.com From: Sachin Petkar [EMAIL PROTECTED] Subject: MySQL 4.0.18 on Mac OS X 10.2.8 won't start For some reason, MySQL 4.0.18 has suddenly stopped running and will not start anymore. It has been running for several weeks until about 5 days ago. When I tried to reach it, I discovered that it is no longer running. However, attempting to start it via the mysqld_safe script simply returns with: Starting mysqld daemon with databases from /usr/local/mysql/data 060402 18:49:55 mysqld ended [1]Done ./mysqld_safe --user mysql To confirm, the /tmp/mysql.sock file does not exist at this point. Any ideas on how to get this running again? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL 4.0.18 on Mac OS X 10.2.8 won't start
Sachin Petkar wrote: For some reason, MySQL 4.0.18 has suddenly stopped running and will not start anymore. It has been running for several weeks until about 5 days ago. When I tried to reach it, I discovered that it is no longer running. However, attempting to start it via the mysqld_safe script simply returns with: Starting mysqld daemon with databases from /usr/local/mysql/data 060402 18:49:55 mysqld ended [1]Done ./mysqld_safe --user mysql To confirm, the /tmp/mysql.sock file does not exist at this point. There are several possible reasons for this. One of the most common is inappropriate permissions on the files in /usr/local/mysql/data (they need to be readable and writable by the user under which mysql is run, usually mysql) The first thing you should do is check the error log file in /usr/local/mysql/data, on Mac OS X, usually named hostname.err In a terminal window, typing: tail /usr/local/mysql/data/example.com.err will give you the last few lines of this file and likely tell you what the specific problem is. It's possible you may need to be root or use sudo command to get permissions to read this file. Another poster suggested verifying that MySQL is not running. In your case it has clearly stopped, but you can always verify that by using the ps command: ps auwx | grep mysql If it's running, you will see an item with /usr/local/mysql/bin/mysqld in the list. It was also suggested to us another utility other than safe_mysqld to start the mysql server. In most cases it is better to use safe_mysqld. Any special options you need can be specified in /etc/my.cnf. But it sounds like you are using the default installation, so everything should just work. Eric -- Eric Braswell Web Manager MySQL AB Cupertino, USA -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL 4.0.18 on Mac OS X 10.2.8 won't start
Thanks to everyone, MySQL is back up and running. This was definitely enlightening! Sachin On 4/3/06, Eric Braswell [EMAIL PROTECTED] wrote: Sachin Petkar wrote: For some reason, MySQL 4.0.18 has suddenly stopped running and will not start anymore. It has been running for several weeks until about 5 days ago. When I tried to reach it, I discovered that it is no longer running. However, attempting to start it via the mysqld_safe script simply returns with: Starting mysqld daemon with databases from /usr/local/mysql/data 060402 18:49:55 mysqld ended [1]Done ./mysqld_safe --user mysql To confirm, the /tmp/mysql.sock file does not exist at this point. There are several possible reasons for this. One of the most common is inappropriate permissions on the files in /usr/local/mysql/data (they need to be readable and writable by the user under which mysql is run, usually mysql) The first thing you should do is check the error log file in /usr/local/mysql/data, on Mac OS X, usually named hostname.err In a terminal window, typing: tail /usr/local/mysql/data/example.com.err will give you the last few lines of this file and likely tell you what the specific problem is. It's possible you may need to be root or use sudo command to get permissions to read this file. Another poster suggested verifying that MySQL is not running. In your case it has clearly stopped, but you can always verify that by using the ps command: ps auwx | grep mysql If it's running, you will see an item with /usr/local/mysql/bin/mysqld in the list. It was also suggested to us another utility other than safe_mysqld to start the mysql server. In most cases it is better to use safe_mysqld. Any special options you need can be specified in /etc/my.cnf. But it sounds like you are using the default installation, so everything should just work. Eric -- Eric Braswell Web Manager MySQL AB Cupertino, USA -- Sachin Petkar Email : [EMAIL PROTECTED]
Re: MySQL 4.0.18 on Mac OS X 10.2.8 won't start
On Monday, 3 April 2006 at 2:29:48 +0530, Sachin Petkar wrote: On 4/3/06, Eric Braswell [EMAIL PROTECTED] wrote: Sachin Petkar wrote: For some reason, MySQL 4.0.18 has suddenly stopped running and will not start anymore. ... There are several possible reasons for this. ... Thanks to everyone, MySQL is back up and running. This was definitely enlightening! Did you establish what the cause of the problem was? Greg -- Greg Lehey, Senior Software Engineer MySQL AB, http://www.mysql.com/ Echunga, South Australia Phone: +61-8-8388-8286 Mobile: +61-418-838-708 VoIP: sip:[EMAIL PROTECTED], sip:[EMAIL PROTECTED] Are you MySQL certified? http://www.mysql.com/certification/ pgp7OhHs3uSkl.pgp Description: PGP signature
Re: MySQL 4.0.18 on Mac OS X 10.2.8 won't start
I created the my.cnf file (for some reason, it was nowhere to be found) and passed it as an argument to mysqld_safe . That's it! Works beautifully now. Thanks, Sachin On 4/3/06, Greg 'groggy' Lehey [EMAIL PROTECTED] wrote: On Monday, 3 April 2006 at 2:29:48 +0530, Sachin Petkar wrote: On 4/3/06, Eric Braswell [EMAIL PROTECTED] wrote: Sachin Petkar wrote: For some reason, MySQL 4.0.18 has suddenly stopped running and will not start anymore. ... There are several possible reasons for this. ... Thanks to everyone, MySQL is back up and running. This was definitely enlightening! Did you establish what the cause of the problem was? Greg -- Greg Lehey, Senior Software Engineer MySQL AB, http://www.mysql.com/ Echunga, South Australia Phone: +61-8-8388-8286 Mobile: +61-418-838-708 VoIP: sip:[EMAIL PROTECTED], sip:[EMAIL PROTECTED] Are you MySQL certified? http://www.mysql.com/certification/ -- Sachin Petkar Home : +91 80 4120 8542 Email : [EMAIL PROTECTED]