LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-21-2006, 02:35 AM   #1
DdOs
LQ Newbie
 
Registered: Feb 2006
Location: Sydney, Australia
Distribution: Slackware 10.2
Posts: 21

Rep: Reputation: 15
Question MySQL is not starting automatically


Hi..
I am Using Slackware 10.2 with Dropline Gnome. Yesterday I installed MySQL 5.1.4-alpha on my system. Everything is ok. when i try to turn MySQL on manualy with..

/usr/local/mysql/bin/mysql_safe -user=mysql &

MySQL turns ON.. but I want to start it automatically when I start Slackware as Apache Server DOES...

Please, let me know what to do!!

Please, note.. I am not an EXPART USER.. I am Just a Beginer, so, it will be so kind of you if you reply in DETAIL...

Thank You all
 
Old 09-21-2006, 02:53 AM   #2
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
in redhat chkconfig mysqld on (which is the easy way...)
but in slack you'll probably have to use the old fashioned way which was creating or deleting symbolic links in the respective /etc/rcX.d/ directories. Here X in rcX.d is a number which stands for the runlevel. There can be two kinds of symbolic links in the /etc/rcX.d/ directories. One starts with the character 'S' followed by a number between 0 and 99 to denote the priority, followed by the name of the service you want to enable. The second kind of symlink has a name which starts with a 'K' followed by a number and then the name of the service you want to disable. So in any runlevel, at any given time, for each service, there should be only one symlink of the 'S' or 'K' variety but not both.
So you'll probably have to write your own script? I am not so firm with Slackware but it should look like this for e.g. /etc/rc.d/rc.M
Code:
# Start MySQL server:
if [ -x /etc/rc.d/rc.mysql ]; then
. /etc/rc.d/rc.mysql start
fi
and of course add this to /etc/rc.d/rc.K above the #Kill all processes line:
Code:
# Shut down the MySQL database server
if [ -x /etc/rc.d/rc.mysql ]; then
. /etc/rc.d/rc.mysql stop
fi
Then you'll have to create the /etc/rc.d/rc.mysql script like this
Code:
#!/bin/sh
#
# Start the MySQL database server
#

case "$1" in
'start')
/usr/local/mysql/support-files/mysql.server start ;;
'stop')
/usr/local/mysql/support-files/mysql.server stop ;;
'restart')
/usr/local/mysql/support-files/mysql.server restart ;;
*)
echo "usage $0 start|stop|restart" ;;
esac
But maybe there is a much easier way on how to do this.
 
Old 09-21-2006, 04:32 AM   #3
DdOs
LQ Newbie
 
Registered: Feb 2006
Location: Sydney, Australia
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
odcheck,

First I want to thank you for reply. Thank You Very Much...
I have tried you way.. but.. still it's not working. I can run MySQL manually.. but not automatically.. any other way??

Thanking You again

DdOs
 
Old 09-21-2006, 04:37 AM   #4
filex
Member
 
Registered: Sep 2004
Posts: 56

Rep: Reputation: 15
Not sure slackware have /etc/rc.local?

Just edit /etc/rc.local and putting your startup command.
 
Old 09-21-2006, 10:08 AM   #5
zborgerd
Member
 
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378

Rep: Reputation: 30
Read the initialization file located here:

/etc/rc.d/rc.mysqld

And it will tell you how to make it startup on boot.
 
Old 09-21-2006, 10:18 AM   #6
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
@filex
Quote:
Not sure slackware have /etc/rc.local?
I don't know which Linux or Unix derivate has no rc.local ?
But I will learn if you let me know.
 
Old 09-21-2006, 10:24 AM   #7
Aeiri
Member
 
Registered: Feb 2004
Posts: 307

Rep: Reputation: 30
Slackware has all non necessary services disabled by default, not by commenting, but by having the "/etc/rc.d/rc.XXXX" file non-executable.

The simple solution is to run "chmod +x /etc/rc.d/rc.mysqld".

Also, Slackware doesn't have "/etc/rc.local", it's instead at "/etc/rc.d/rc.local".
 
Old 09-21-2006, 10:38 AM   #8
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
@Aeiri

confusing...?
Quote:
Also, Slackware doesn't have "/etc/rc.local", it's instead at "/etc/rc.d/rc.local".
I am happy that I never said that.
But correct sentence would be blahfassel.... located at /etc/rc.local it's in /etc/rc.d/

But I still don't know if it works now for DdOs?
 
Old 09-25-2006, 04:42 AM   #9
DdOs
LQ Newbie
 
Registered: Feb 2006
Location: Sydney, Australia
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by odcheck

would be blahfassel.... located at /etc/rc.local it's in /etc/rc.d/

But I still don't know if it works now for DdOs?
Buddy... odcheck...

in slackware I can found only /etc/rc.d ... I guess.. every program to start automatically while loading Slackware is controlled by this folder.. but.. I don't have anything like /etc/rc.d/rc.mysqld :S

Guys.. do you suggest me to re-Install slackware with appropeate options?? as you know I am a newbie.. I am not sure actually.. that which programs are appropeate for me.. :S

I have tried to copy /support-files/mysql.server to /etc/rc.d/mysql AND even tried to copy the file as rc.mysqld.. but still not working...

I found the installations process for Apache + PHP + MySql (all togather) on www.madpenguin.org. I had to do some extra work with Apache.. like i had to Delete builtin rc.httpd then copy apachectl from /usr/local/apache2 (--- newly installed apache folder) to /etc/rc.d/ as rc.httpd... then I changed mode for that file with
chmod 755 rc.httpd.. after doing all this.. apache starts automatically and the new version is working now..

I tried several ways with my LIMITED Knowledge on slackware linux to get mysql started automatically... still not working.. any more suggestion??

thank you all... very very much for helping me..

DdOs
 
Old 09-25-2006, 08:17 AM   #10
zborgerd
Member
 
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378

Rep: Reputation: 30
Did you read the contents of /etc/rc.d/rc.mysqld ?

You should be using the default script that slackware installed. If you are not, then things may not work. Do not copy files around aimlessly.

If you've tainted the init script with some other bizarre file, you should reinstall it. The /etc/rc.d/rc.mysqld that is installed by default has all of the information in its first few lines that you will need to make it work.

Last edited by zborgerd; 09-25-2006 at 08:19 AM.
 
Old 09-25-2006, 08:54 AM   #11
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
I said that I created those files.
Not that you'll find them.
 
Old 09-27-2006, 12:31 AM   #12
DdOs
LQ Newbie
 
Registered: Feb 2006
Location: Sydney, Australia
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by zborgerd
Did you read the contents of /etc/rc.d/rc.mysqld ?

You should be using the default script that slackware installed. If you are not, then things may not work. Do not copy files around aimlessly.

If you've tainted the init script with some other bizarre file, you should reinstall it. The /etc/rc.d/rc.mysqld that is installed by default has all of the information in its first few lines that you will need to make it work.
My Friend.. I already informed you all that there was no file in /etc/rc.d/ named rc.mysqld.... and I have followed a set of instruction to install mysql, apache and php... apache and php is OK and fine.. problem with mysqld only... but still I will try your suggestion... I will reinstall mysql again.. by the way.. how to UNINSTALL mysql?? can you help me?? I want to Uninstall mysql completely so that when I reinstall mysql.. no problem is there...

Thank YOU ALL

DdOs
 
Old 09-27-2006, 12:35 AM   #13
DdOs
LQ Newbie
 
Registered: Feb 2006
Location: Sydney, Australia
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by odcheck
I said that I created those files.
Not that you'll find them.

Sorry buddy.. I didn't actually mean that... I was trying answer everyon's questions with the same post.

Thank You

DdOs
 
Old 09-27-2006, 05:09 PM   #14
zborgerd
Member
 
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378

Rep: Reputation: 30
Quote:
Originally Posted by DdOs
My Friend.. I already informed you all that there was no file in /etc/rc.d/ named rc.mysqld.... and I have followed a set of instruction to install mysql, apache and php... apache and php is OK and fine.. problem with mysqld only... but still I will try your suggestion... I will reinstall mysql again.. by the way.. how to UNINSTALL mysql?? can you help me?? I want to Uninstall mysql completely so that when I reinstall mysql.. no problem is there...

Thank YOU ALL

DdOs
If the /etc/rc.d/rc.mysqld init script is missing, then there is something wrong with your myqsl install.

Download the mysql package from the Slackware ftp site. The latest version is located in the /patches/ folder for 10.2.

http://slackware.osuosl.org/slackwar..._slack10.2.tgz

You can, as root, type:

"upgradepkg --reinstall mysql-4.1.21-i486-1_slack10.2.tgz".
 
Old 10-02-2006, 05:28 AM   #15
DdOs
LQ Newbie
 
Registered: Feb 2006
Location: Sydney, Australia
Distribution: Slackware 10.2
Posts: 21

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by zborgerd
If the /etc/rc.d/rc.mysqld init script is missing, then there is something wrong with your myqsl install.

Download the mysql package from the Slackware ftp site. The latest version is located in the /patches/ folder for 10.2.

http://slackware.osuosl.org/slackwar..._slack10.2.tgz

You can, as root, type:

"upgradepkg --reinstall mysql-4.1.21-i486-1_slack10.2.tgz".
Thank You buddy.. I will try to reinstall first.. if Unsuccessful then I will go for latest version.. thanx a lot for your suggestion.. I defenately will let you all know what ever happens...

Thank you

DdOs
 
  


Reply

Tags
mysql, mysql5, slackware



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
help starting KDE 3.3.2 automatically fcoutel Linux - Newbie 22 01-03-2005 11:34 AM
not starting automatically ??? JNaas Linux - Networking 0 09-30-2004 07:25 PM
Automatically starting Kppp Gomi Linux - Newbie 1 05-18-2004 08:33 PM
Prevent X from starting automatically Yocal Linux - Newbie 6 08-27-2003 05:31 PM
Starting X Automatically shari Linux - Software 2 08-08-2001 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:39 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