LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-12-2006, 01:34 AM   #1
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Rep: Reputation: 33
/etc/init.d/mysql


I expirienced some problems with MySql so I decided to clear everithing and to reinstall it. So I did it, but I also deleted startup scripts in /etc/init.d and now I have installed MySql but without startup scripts.
Are these scripts a part of a package or where could I find them?

Thanks
 
Old 01-12-2006, 01:37 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Ipolit
I expirienced some problems with MySql so I decided to clear everithing and to reinstall it. So I did it, but I also deleted startup scripts in /etc/init.d and now I have installed MySql but without startup scripts.
Are these scripts a part of a package or where could I find them?

Thanks
It is one of the mysql-server packages.
Code:
apt-file search init.d/mysql
mysql-server: etc/init.d/mysql
mysql-server-4.1: etc/init.d/mysql
mysql-server-5.0: etc/init.d/mysql
So you should reinstall whichever one it is you are using.
 
Old 01-12-2006, 08:49 PM   #3
LLS
Member
 
Registered: Sep 2003
Location: North America
Distribution: FC6 FC7 F8
Posts: 75

Rep: Reputation: 15
Debian Sarge mysql start-up scripts but I think you will have to do as HappyTux stated but here they are to try.

/etc/mysql/debian-start

Code:
#!/bin/bash
#
# This script is executed by "/etc/init.d/mysql" on every (re)start.
# 
# Changes to this file will be preserved when updating the Debian package.
#

source /usr/share/mysql/debian-start.inc.sh

MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
MYCHECK_PARAMS="--all-databases --fast --silent"

# Put commands in the background if they should not block the server start.
(
  mycheck;
) &

exit 0
/usr/share/mysql/debian-start.inc.sh

Code:
#!/bin/bash
#
# This file is included by /etc/mysql/debian-start
#

function mycheck() {
  set -e
  set -u

  # Now, as the server seems to be up, check all unclosed tables.
  # But do it in the background to not stall the boot process.
  echo "Checking for crashed MySQL tables in the background."
  logger -p daemon.info -i -t$0 "Checking for crashed MySQL tables."

  # Checking for $? is unreliable so the size of the output is checked.
  # Some table handlers like HEAP do not support CHECK TABLE.
  tempfile=`tempfile`
  LC_ALL=C $MYCHECK $MYCHECK_PARAMS \
    2>&1 \
    | perl -e '$_=join("", <>); s/^[^\n]+\n(error|note)\s+: The (handler|storage engine) for the table doesn.t support check\n//smg;print;' \
    > $tempfile
  if [ -s $tempfile ]; then
    (
      /bin/echo -e "\n" \
        "Improperly closed tables are also reported if clients are accessing\n" \
 	"the tables *now*. A list of current connections is below.\n";
       $MYADMIN processlist status
    ) >> $tempfile
    mailx -e -s"$MYCHECK_SUBJECT" root < $tempfile
    (echo "$MYCHECK_SUBJECT"; cat $tempfile) | logger -p daemon.warn -i -t$0
  fi
  rm $tempfile
}
 
Old 01-13-2006, 07:24 AM   #4
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Original Poster
Rep: Reputation: 33
actually the problem was different.
In synaptic mysql-server was marked as installed , but it wasn't.
I updated synaptic and reisntalled mysql and now everything is fine.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
/etc/init.d/mysql restart problem meenalborkar Debian 3 11-11-2005 07:40 AM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
error: No init found. Try passing the init= option to the Kernel neylitalo Linux - Laptop and Netbook 3 01-22-2004 09:34 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration