Variable for `/bin/hostname`?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Variable for `/bin/hostname`?

Postby PaulW » 09. August 2011 23:42

I've moved my mysql data files to an alternate directory. Had problems with "/opt/lampp/lampp stop" not terminating mysqld or mysqld_safe. Had to use "kill -9 #####" to terminate the two procs. I also noted that the {machine name}.pid file was being written to the new alternate mysql data directory and it was not being deleted upon "stop". Dug around a bit in /opt/lampp/lampp and found that a section of code that stopped mysql contained the following
Code: Select all
if test -f /opt/lampp/var/mysql/`/bin/hostname`.pid
So, I construed that the {machine name}.pid file had to reside in "/opt/lampp/var/mysql". In order to accomplish that, I added the following to my.cnf
Code: Select all
pid-file = /opt/lampp/var/mysql/{machine name}.pid
That's a long way of getting to my question: I'd rather use a variable in my.cnf rather than hard-coding the machine name, but I haven't the foggiest what variable to use that my.cnf would recognize as the machine name. Any thoughts???
Posts: 13
Joined: 20. November 2005 17:20
Location: Norton, Ohio (USA)

Re: Variable for `/bin/hostname`?

Postby JonB » 10. August 2011 05:44

A - don't know (at the moment)

B- have you tried the MySQL forums???

good luck
User avatar
AF Moderator
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests