Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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.
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??
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?
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??
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.
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...
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.