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 02-14-2008, 02:03 AM   #1
packets
Member
 
Registered: Oct 2005
Posts: 339

Rep: Reputation: 32
error in init script of mysql from source


I have installed mysql-5.0.45 via source. My parameters in ./configure is

--prefix=/usr/local/mysql --localstatedir=/data/mysql/data --with-unix-socket-path=/data/mysql

Then I copy the mysql.server at support-files and place in the init.d dir and rename as mysqld.

I edit mysqld and remove the backticks at @HOSTNAME@ due to the error @HOSTNAME@: command not found

And now the only error encountered when starting is:

[root@smtp01 mysql]# /etc/init.d/mysql start
Starting MySQL/etc/init.d/mysql: line 159: kill: (935) - No such process
[FAILED]

I check the line 159 and cannot find any thing related to the error. Here is the snippet:

kill -0 $2 || break # if the program goes away, stop waiting

Please advise. I can start the mysql via command line /usr/local/mysql/bin/mysqld_safe --user=mysql &.

Take note that there is no error when shutting down mysql. Error only occur when starting mysql.
 
Old 02-14-2008, 03:49 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
I edit mysqld and remove the backticks at @HOSTNAME@ due to the error @HOSTNAME@: command not found
My guess is that your hostname is not configured correctly, because that @HOSTNAME@ should have been replaced by /bin/hostname (and yes the backticks are needed to run that command).
What is the output of
Code:
/bin/hostname
If it's not correct, edit /etc/hosts accordingly.
 
Old 02-14-2008, 06:26 PM   #3
packets
Member
 
Registered: Oct 2005
Posts: 339

Original Poster
Rep: Reputation: 32
How about the error. For me this is the most concern.

Quote:
[root@smtp01 mysql]# /etc/init.d/mysql start
Starting MySQL/etc/init.d/mysql: line 159: kill: (935) - No such process
[FAILED]

I run /bin/hostname and it resolve. I just want to have a a script of start/stop of the mysql
 
Old 02-15-2008, 01:53 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
The error is related to the fact that "@HOSTNAME@" wasn't replaced during install with its actual value. If you take a look at the startup script you've edited, you'll see that it uses " `@HOSTNAME@`.pid " to find out the pid of mysql.
Anyway you can replace `@HOSTNAME@` with `/bin/hostname` and see if it works. Or you can use the mysql.server startup script from the binary distribution of mysql.

Regards
 
  


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
init.d script error bad interpreter snowmedia Red Hat 8 10-01-2011 06:16 PM
MySQL init script hondo Linux - Networking 2 01-19-2007 12:15 PM
mysql error in php script: kev000 Programming 3 12-01-2006 08:28 AM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM
small error in init script islandkid Linux - General 3 03-21-2002 04:06 PM

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

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