LinuxQuestions.org
Visit Jeremy's Blog.
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 05-03-2008, 06:51 AM   #1
bhatmahesht
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
MySQL failed to start in XAMPP


Hi,


My system is a development machine running Red Hat linux 5.

I downloaded XAMPP 1.6.6 from apachefriends and extracted it to /opt

Then I wanted to start the XAMPP with this command

#cd /opt/lampp
#./lampp start
It gave following message
Starting XAMPP for Linux 1.6.6...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

But when I checked with this command
$lampp status
Apache is running.
MySQL is not running.
ProFTPD is running.

When I checked in system monitor tool, mysql process starts for a while and disappears.

I again downloaded XAMPP and installed it but the problem persisted.

glibc is also installed in my system

Can anybody help me to resolve this.

Regards,

Mahesh Bhat
 
Old 05-03-2008, 07:28 AM   #2
bhatmahesht
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Hi, it is me again......
for the above problem I checked the log file it showed follwoing messages whenever I tried to start the MySql server

080503 15:44:49 mysqld started
080503 15:44:49 [ERROR] Can't start server : Bind on unix socket: Permission denied
080503 15:44:49 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
080503 15:44:49 [ERROR] Aborting

Can anybody help me to solve this unix socket error.
Where should I change the permission and how??


Regards,

Mahesh Bhat
 
Old 05-03-2008, 10:01 PM   #3
bhatmahesht
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
MySQL failed to start in XAMPP

Hi All,

Whenever I wanted to start mysql it gives the following error in the log fine and fails to start

080503 15:44:49 mysqld started
080503 15:44:49 [ERROR] Can't start server : Bind on unix socket: Permission denied
080503 15:44:49 [ERROR] Do you already have another mysqld server running on socket: /opt/lampp/var/mysql/mysql.sock ?
080503 15:44:49 [ERROR] Aborting


What is unix socket.........how can I correct it?

Can anybody help me to correct it

Regards,

Mahesh Bhat
 
Old 05-04-2008, 01:44 AM   #4
BugZRevengE
Member
 
Registered: Oct 2005
Location: Australia
Distribution: Slackware & Kubuntu & CentOS
Posts: 106

Rep: Reputation: 17
unix sockets are a file type object that unix programs can communicate over - so the server creates a socket in the directory quoted in the error, and listens to that socket for connections, clients on the local machine can then connect to the socket to talk to the server, this only works if both processes are on the local machine, eg if you are connecting to localhost as the hostname in mysql.
If MySQL has a connection from a remote computer, it uses tcp connections, which have more overhead then unix sockets (not much, but it can make a diffence when you run a busy webserver connecting to localhost).

Your error seems to indicate that either the server is already running - check the socket exists already:
Code:
ls /opt/lampp/var/mysql/
and see if the file mysql.sock exists (and check it is a socket)
if it does exist - you might already be running mysql
[code]ps auxhw |grep mysql[code]
will show a mysql process if it is running

if it does not exist, check the user running mysql (mysql or nobody) has write permission to the directory the socket is created in (/opt/lampp/var/mysql/) and that the directory exists.

If these fail, post back with the output of:
Code:
ls -la /opt/lampp/var/mysql
and the user you are running mysql as (probably in mysql config file)
as this will help to verify the problem
 
Old 05-05-2008, 02:26 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
moved to software for merge
 
Old 05-24-2008, 08:10 AM   #6
bhatmahesht
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,

I did as you told and following are the results

Code:
ps auxhw |grep mysql
root      3765  0.0  0.1   3880   664 pts/0    R+   17:30   0:00 grep mysql
Code:
ls -la /opt/lampp/var/mysql
total 28
drwxr-xr-x 6 mysql  mysql 4096 May 24 17:21 .
drwxr-xr-x 4 root   root  4096 May 24 17:21 ..
drwxr-xr-x 2 mysql  mysql 4096 May  3 15:40 cdcol
-rw-rw---- 1 nobody mysql 3660 May 24 17:21 localhost.err
drwxr-xr-x 2 mysql  mysql 4096 May  3 15:40 mysql
drwxr-xr-x 2 mysql  mysql 4096 May  3 15:40 phpmyadmin
drwxr-xr-x 2 mysql  mysql 4096 May  3 15:40 test

What does thease Indicate?

What could be the next step in solving the problem


Regards
 
Old 07-23-2008, 10:49 AM   #7
sclaros
LQ Newbie
 
Registered: Jul 2008
Posts: 1

Rep: Reputation: 0
I had the same problem. The Mysql server couldn't start because is not allowed to write the file in the directory. In my case i change the group to www-data with read & write permission, and its now running.
 
Old 07-23-2008, 06:48 PM   #8
BugZRevengE
Member
 
Registered: Oct 2005
Location: Australia
Distribution: Slackware & Kubuntu & CentOS
Posts: 106

Rep: Reputation: 17
bhatmahesht: Sorry for the delay... I did not see the reply, I missed the email notification :-(
have you solved your problem? looking at the folder only mysql user has write permission, so you are hopefully running mysql as the user mysql?
to find this out you should run
grep user /path/to/my.cnf
replacing/path/to with the correct path, perhaps /opt/lampp/etc/mysql ?

Your ps output indicates the server is definetly not running, so it is a permission problem on: /opt/lampp/var/mysql/mysql.sock and this indicates that you are probably not running mysql as the mysql user, perhaps you are running as the user nobody...

1. correct the user in the my.cnf file to be mysql, or (prefered - as your databases seem to be owned by the user mysql anyway, and it is the user designed for this)
2. change the permissions of the directory so that the user nobody has write access
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mysql socket error and can't get it to start trebek Linux - Server 9 04-07-2007 05:09 AM
Getting an error: Failed to start the X server Fasn8n Linux - General 5 02-09-2006 10:05 AM
Wierd error with ping WARNING: failed to install socket filter: Protocol not availabl abefroman Linux - Networking 4 03-25-2004 06:48 PM
Failed to start apache error help SSBN Linux - Networking 2 04-30-2003 08:35 PM
Error: Acct: Couldn't insert SQL accounting START record - Duplicate entry '15212' fo ethanchic Linux - Software 0 04-11-2003 11:48 PM


All times are GMT -5. The time now is 10:57 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration