DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd May 2008
zeltus zeltus is offline
New User
 
Join Date: May 2008
Posts: 3
Thanked 0 Times in 0 Posts
Unhappy MySQL continually restarting...

I really hope someone out there can help me with this!

My mysqld_safe daemon has suddenly begun to restart itself continually...

jail0043# /usr/local/bin/mysqld_safe -user=mysql --log=/tmp/mysql.log &
[1] 81057
jail0043# usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
080523 09:39:26 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
080523 09:39:27 mysqld_safe mysqld restarted
080523 09:39:28 mysqld_safe mysqld restarted
080523 09:39:28 mysqld_safe mysqld restarted
080523 09:39:29 mysqld_safe mysqld restarted
.
.
.

The only means I have found to stop this is to "kill -9" the process, which is a bit nasty.

The logfile shows nothing.

myisamchk --recover did sort out my blog tables a bit - but hasn't solved this restarting problem.

I can't find anything searching the 'net, which seems a bit strange - has anyone else come across this and can offer wordsof advice and wisdom?

Cheers

Bill
Reply With Quote
  #2   (View Single Post)  
Old 23rd May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

mysqld_safe restarts on error according to the man page.


Since it's a shells cript you are probably looking at this:

Code:
echo "Starting $MYSQLD daemon with databases from $DATADIR"

echo "`date +'%y%m%d %H:%M:%S  mysqld started'`" >> $err_log
while true
do
  rm -f $safe_mysql_unix_port $pid_file # Some extra safety
  if test -z "$args"
  then
    $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file  >> $err_log 2>&1
  else
    eval "$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file  $args >> $err_log 2>&1"
  fi
  if test ! -f $pid_file                # This is removed if normal shutdown
  then
    echo "STOPPING server from pid file $pid_file"
    break
  fi

  echo "`date +'%y%m%d %H:%M:%S'`  mysqld restarted" | tee -a $err_log
done

echo "`date +'%y%m%d %H:%M:%S'`  mysqld ended" | tee -a $err_log
echo "" | tee -a $err_log
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #3   (View Single Post)  
Old 27th May 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Thanked 35 Times in 31 Posts
Default

If you want to shutdown the mysql process without the "kill -9" vector, you might want to use -

"mysqladmin shutdown"

which will shut down the mysql engine. You may get an error if you have password protected your mysql. In that case, here's the nuanced command when the username is root and the password is mypass-

"mysqladmin -u root -pmypass shutdown"

Notice that the password immediately follows the -p switch, unlike the username, which is spaced after the -u switch. If you put in the -p switch but don't follow up with a password at all, you will be prompted for a password.

You can also use mysqladmin to check to see if mysql is running-

mysqladmin ping

BTW, you should probably post non-OS-specific questions like this elsewhere on the site... not slapping you around, but as an OBSD user I'm not likely to see this question because it's in the FBSD section.
__________________
Network Firefighter
Reply With Quote
  #4   (View Single Post)  
Old 28th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

I might be a paranoid individual but I never give passwords over the command line.

To me, it's like using FTP...
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #5   (View Single Post)  
Old 29th May 2008
ai-danno's Avatar
ai-danno ai-danno is offline
Spam Deminer
 
Join Date: May 2008
Location: Boca Raton, Florida
Posts: 284
Thanked 35 Times in 31 Posts
Default

If you are ssh'd into the box then I would respectfully assert that your paranoia is not justified. However, if you simply provide the -p without the password, it will prompt you to type the password, which will not appear.

If you are telnetted into the box you have already given away the keys to the kingdom upon login to the box itself.
__________________
Network Firefighter
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySql on NetBSD 5.0 Zvrk NetBSD General 6 17th August 2009 12:31 PM
Racoon: restarting a particular VPN connection bram85 General software and network 0 21st January 2009 12:33 PM
OpenLDAP and MySQL PatrickBaer FreeBSD General 1 4th November 2008 04:44 PM
MYSQL HOW TO START disappearedng FreeBSD General 7 18th September 2008 09:48 AM
mysql using >100% cpu bdj FreeBSD General 5 16th May 2008 04:20 PM


All times are GMT. The time now is 08:23 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick