[Fixed] "Couldn't start MySQL!"

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

[Fixed] "Couldn't start MySQL!"

Postby Tcherno » 25. February 2013 21:05

Hi!

I seem to have trouble starting MySQL. I've done a bit of research in this forum but I'm still a bit lost...
My configuration is:
- Ubuntu 12.04 LTS 32bits
- xampp 1.8.1

What happens in my terminal is this:
Code: Select all
lucien@lucien-AOD257:~$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.8.1...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
[b]XAMPP: Couldn't start MySQL![/b]
XAMPP: Starting ProFTPD...
XAMPP for Linux started.


EDIT: just skip this part, my first intuition was wrong. The solution is at the end of the post.

I looked into /opt/lampp/etc/my.cnf and found this :
[...]
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
user = nobody
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock
skip-external-locking
[...]


So I checked the directory/opt/lampp/var/mysql and there was no such document as "mysql.sock" (it was not hidden, I checked that too). I entered "mysql.sock" in the search engine and found nothing on my computer. I think that it might be the reason I can't MySQL.

There is one thing I did "my way" but I don't think it causes any issue: instead of using the terminal to extract the archive into /opt, I extracted the files into my Deskop, entered "sudo nautilus" in a terminal to open nautilus with administrator rights, and move the "lampp" directory into "/opt". When I start lampp and then access http://localhost I see the splashscreen but can't interact with it (because of the MySQL thing).

Can you help me and are the pieces of information I wrote here helpful? Thanks! :mrgreen:

EDIT: Solution
When the line "XAMPP: Couldn't start MySQL!" appears, the details are written in /opt/lampp/var/mysql/localhost.localdomain.err (the name of the file can be different, but the extensions is ".err". For me it was /opt/lampp/var/mysql/lucien-AOD257.err)

If you see some lines starting with "InnoDB", and things like "InnoDB: The error means mysqld does not have the access rights" etc. then it probably is a permission issue. To fix it, the owner of the files in /opt/lampp must be nobody:root (user:group).

Thank you JonB!
By the way, if I wrote something completely wrong in this solution, feel free to edit it 8)
Last edited by Tcherno on 26. February 2013 10:22, edited 1 time in total.
User avatar
Tcherno
 
Posts: 3
Joined: 25. February 2013 20:37
Location: France
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 32bits

Re: "Couldn't start MySQL!"

Postby JonB » 25. February 2013 22:28

you should check the MySQL error log -

/opt/lampp/var/mysql/localhost.localdomain.err

Also check the ownership of the files in /opt/lampp, The owner should be nobody:root (user:group)

BTW a socket is an object, not a file. (effectively it is a port) - thus you can't find it.

A Unix domain socket or IPC socket (inter-process communication socket) is a data communications endpoint for exchanging data between processes executing within the same host operating system. While similar in functionality to named pipes, Unix domain sockets may be created as byte streams or as datagram sequences[clarify], while pipes are byte streams only. Processes using Unix domain sockets do not need to share a common ancestry. The API for Unix domain sockets is similar to that of an Internet socket, but it does not use an underlying network protocol for communication. The Unix domain socket facility is a standard component of POSIX operating systems.

Unix domain sockets use the file system as address name space. They are referenced by processes as inodes in the file system. This allows two processes to open the same socket in order to communicate. However, communication occurs entirely within the operating system kernel.

In addition to sending data, processes may send file descriptors across a Unix domain socket connection using the sendmsg() and recvmsg() system calls.

http://en.wikipedia.org/wiki/Unix_domain_socket

Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: "Couldn't start MySQL!"

Postby Tcherno » 26. February 2013 09:04

Thanks! I found the file, the name is a bit different (lucien-AOD257.err) but still contains useful informations. I'll try to fix my problem today and will reply later 8)
User avatar
Tcherno
 
Posts: 3
Joined: 25. February 2013 20:37
Location: France
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 32bits

Re: "Couldn't start MySQL!"

Postby Tcherno » 26. February 2013 10:08

Hi again! I tried to fix it... and I failed :mrgreen:

The error log shows:
Can't open the mysql.plugin table. Please run mysql_upgrade to create it.


I enter:
Code: Select all
run mysql_upgrade

I get:
Le programme 'mysql_upgrade' n'est pas encore installé. Vous pouvez l'installer en tapant :
sudo apt-get install mysql-server-core-5.5

(sorry it's in french. I means: 'mysql_upgrade' is not instaled. You can instal it by typing: sudo apt-get install mysql-server-core-5.5)

I enter the following instructions (one instruction at a time):
Code: Select all
sudo apt-get install mysql-server-core-5.5
sudo apt-get install mysql-client-core-5.5
sudo /opt/lampp/lampp start


I get:
XAMPP: Couldn't start MySQL!


I looked into the error log, noticed a lot of "InnoDB" and thought "yes, it's a permission problem". I was going to post the log here when I asked myself: "wait, why is it obvious to me that it is a permission problem?" And I remembered: I read it here!! So I read your post again, set the ownership to nobody:root and started xampp. And you know what? It works, just like that :lol:

Thanks a lot! I'll modify my original post to write the solution.
User avatar
Tcherno
 
Posts: 3
Joined: 25. February 2013 20:37
Location: France
XAMPP Version: 5.6.3
Operating System: Ubuntu 12.04 32bits

Re: [Fixed] "Couldn't start MySQL!"

Postby JonB » 26. February 2013 10:55

OK - I am glad it has worked out for you...

Have fun with XAMPP

:D
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
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 2 guests