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 |
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: Code:
# Shut down the MySQL database server Code:
#!/bin/sh |
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 |
Not sure slackware have /etc/rc.local?
Just edit /etc/rc.local and putting your startup command. |
Read the initialization file located here:
/etc/rc.d/rc.mysqld And it will tell you how to make it startup on boot. |
@filex
Quote:
But I will learn if you let me know. |
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". |
@Aeiri
confusing...? Quote:
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? |
Quote:
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 |
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. |
I said that I created those files.
Not that you'll find them. |
Quote:
Thank YOU ALL DdOs |
Quote:
Sorry buddy.. I didn't actually mean that... I was trying answer everyon's questions with the same post. Thank You DdOs |
Quote:
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". |
Quote:
Thank you DdOs |
All times are GMT -5. The time now is 07:42 PM. |