LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 10-25-2003, 10:17 AM   #1
..:eMa:..
Member
 
Registered: Sep 2003
Location: Italy - Milan
Posts: 61

Rep: Reputation: 15
Deleted /etc/init.d/mysqld where?


Hi!

I've accidentally deleted /etc/init.d/mysqld on RedHat9 where I can find the file?

thanks!

..:eMa:..
 
Old 10-25-2003, 12:44 PM   #2
deckmoney
LQ Newbie
 
Registered: Apr 2003
Distribution: Mandrake 9.1
Posts: 20

Rep: Reputation: 0
#!/bin/bash
#
# mysqld This shell script takes care of starting and stopping
# the MySQL subsystem (mysqld).
#
# chkconfig: - 78 12
# description: MySQL database server.
# processname: mysqld
# config: /etc/my.cnf
# pidfile: /var/run/mysqld/mysqld.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network


prog="MySQL"

datadir="/var/lib/mysql"

start(){
touch /var/log/mysqld.log
chown mysql.mysql /var/log/mysqld.log
chmod 0640 /var/log/mysqld.log
if [ ! -d $datadir/mysql ] ; then
action $"Initializing MySQL database: " /usr/bin/mysql_install_db
ret=$?
chown -R mysql.mysql $datadir
if [ $ret -ne 0 ] ; then
return $ret
fi
fi
chown -R mysql.mysql $datadir
chmod 0755 $datadir
/usr/bin/safe_mysqld --defaults-file=/etc/my.cnf >/dev/null 2>&1 &
ret=$?
if [ $ret -eq 0 ]; then
action $"Starting $prog: " /bin/true
else
action $"Starting $prog: " /bin/false
fi
[ $ret -eq 0 ] && touch /var/lock/subsys/mysqld
return $ret
}

stop(){
/bin/kill `cat /var/run/mysqld/mysqld.pid 2> /dev/null ` > /dev/null 2>&1
ret=$?
if [ $ret -eq 0 ]; then
action $"Stopping $prog: " /bin/true
else
action $"Stopping $prog: " /bin/false
fi
[ $ret -eq 0 ] && rm -f /var/lock/subsys/mysqld
[ $ret -eq 0 ] && rm -f $datadir/mysql.sock
return $ret
}

restart(){
stop
start
}

condrestart(){
[ -e /var/lock/subsys/mysqld ] && restart || :
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status mysqld
;;
restart)
restart
;;
condrestart)
condrestart
;;
*)
echo $"Usage: $0 {start|stop|status|condrestart|restart}"
exit 1
esac

exit $?
 
Old 10-25-2003, 12:44 PM   #3
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
In the mysql-server package on your CDs (or downloaded from Red Hat Network). You can look into rpm packages with either rpm2cpio or "mc" (Midnight Commander). You could also reinstall the package.
 
Old 10-26-2003, 02:49 PM   #4
..:eMa:..
Member
 
Registered: Sep 2003
Location: Italy - Milan
Posts: 61

Original Poster
Rep: Reputation: 15
thnks!

..:eMa:..
 
  


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
Kmail crashes when deleted mail is deleted dufferin Slackware 0 03-21-2005 03:23 PM
INIT.D File deleted from /etc folder deepa_ram Linux - General 1 02-28-2005 10:54 AM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 04:53 PM
Accidentally deleted /etc/init.d .. what do i do? :| waste Linux - General 5 03-04-2004 03:39 AM
accidentally deleted /etc/rc.d/init.d/smb!! heathpitts Linux - Newbie 2 03-07-2003 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:46 AM.

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