MySQL is not running ... but it runs, and runs fine !

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

MySQL is not running ... but it runs, and runs fine !

Postby michiedo » 16. October 2009 17:11

I've just installed the lastet XAMPP (lampp) on kubuntu 9.04.
Changed datadir to point to an NTFS drive, ran mysql_upgrade with success.
Then started it
sudo /opt/lampp/lampp start
.... all ok
but lampp status and lampp stop show:
>Version: XAMPP for Linux 1.7.2
>Apache is running.
>MySQL is not running. <<????
Instead mysql IS runnig, i can connect, query, insert, ...evrything !
actually: ps aux|grep ql shows:
>root ... /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/mnt/NTFS/MySQL_data --pid-file=/mnt/NTFS/MySQL_data/kubuntu9.pid
>nobody ... /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/mnt/NTFS/MySQL_data --user=nobody --log-error=/mnt/NTFS/MySQL_data/kubuntu9.err --pid-file=/mnt/NTFS/MySQL_data/kubuntu9.pid --socket=/opt/lampp/var/mysql/mysql.sock --port=3306
The real annoyance is that "stop" does not stop it. i had to "kill -9" the two tasks, and that's annoyng.
Could anyone help me ?
TIA
michiedo
 
Posts: 3
Joined: 16. October 2009 16:50

Re: MySQL is not running ... but it runs, and runs fine !

Postby michiedo » 17. October 2009 17:49

answering myself:

i have to put the
pid-file=/opt/lampp/var/mysql/_name_of_machine_.pid
in the [mysqld] section of my.cnf
michiedo
 
Posts: 3
Joined: 16. October 2009 16:50

Re: MySQL is not running ... but it runs, and runs fine !

Postby aroxo » 11. June 2010 09:03

Hey All,

I've been having this precise problem for about 2 years with an XAMPP install on AWS. Because on AWS the drive space is limited that's mounted on / you mount a new drive called /vol/.

Once you've done this you probably want to move the mysql datadir to /vol/mysql or something.

When you do this, and update the my.cnf file you start to get this problem on Linux. You also get an issue where you cannot connect to mysql over localhost and only via a full domain name. I've been living with this for 2 years, but I've just found the solution thanks to a proper sysadmin.

When I next do a server build, I'll write out the full procedure for moving the MySQL data directory for XAMPP, but for now here's the additional fix needed, over and above what michiedo has mentioned:

1. Open up in nano /opt/lampp/lampp search for mysql.Find this line:
Code: Select all
 "startmysql")
if testrun /opt/lampp/var/mysql/`/bin/hostname`.pid mysqld


And change it to this:

Code: Select all
if testrun /MYSQL DATA DIRECTOR/`/bin/hostname`.pid mysqld


Then do the same for
Code: Select all
"stopmysql")
.
2. Open up in nano /opt/lampp/etc/php.ini and search for the line:


Code: Select all
mysql.default_socket =


And change it to this:

Code: Select all
mysql.default_socket = /vol/mysql/mysql.sock


Then it should run and run fine! As well as start and stop fine!
aroxo
 
Posts: 20
Joined: 25. February 2009 15:19

Re: MySQL is not running ... but it runs, and runs fine !

Postby Coastalguy » 24. March 2011 01:33

aroxo,

Tried your changes to reset my mysql to another directory, but when I start mysql, I get some sort of a binary error. This is the first time I have used nano, and when I went back in to change my entries back, I noticed parts of the new line were different colors, as the original line that I commented out where all one color. I copied it, what seemed to be exactly as it was (except for my new folder path), so I am not sure what the problem is.

Thanks,
Coastalguy
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 13 guests

cron