13

I am new in Ubuntu, I installed XAMPP in my Ubuntu 10.04. When I start XAMPP it says MySQL couldn't start.

Here is my terminal ouput:

$ sudo /opt/lampp/lampp start Starting XAMPP for Linux 1.8.0... XAMPP: Starting Apache with SSL (and PHP5)... XAMPP: Starting MySQL... XAMPP: Couldn't start MySQL! XAMPP: Starting ProFTPD... XAMPP for Linux started. 

And then as I go to http://localhost, I got stuck on the XAMPP splash-screen, nothing happens if I choose language.

1
  • Did you check the log file? tail /var/log/mysql.log Commented Sep 20, 2012 at 14:32

9 Answers 9

31

This Worked For me as a Charm. [I used Ubuntu 12.04 and Xampp]

sudo chmod 755 /opt/lampp/etc/my.cnf sudo chmod -R 777 /opt/lampp/var/mysql sudo chown -hR root:root /opt/lampp 

& Now Start Your Xampp

Sign up to request clarification or add additional context in comments.

2 Comments

sudo chown -hR root:root /opt/lampp works for me, instead of sudo chown -hR root/opt/lampp, like @this.lau_ said
I tried this, but didn't work for me. I am using ubuntu 14.04 by the way.
8

It might just be that the /opt/lampp doesn't have the right permissions. Before reinstalling everything, try running the commands below, it worked for me:

sudo /opt/lampp/lampp stop sudo chmod 755 /opt/lampp/etc/my.cnf sudo chmod -R 777 /opt/lampp/var/mysql sudo chown -hR root:root /opt/lampp sudo /opt/lampp/lampp start 

Comments

4

Just remove the version where the MySQL is not started with the command rm -rf /opt/lampp and the command:

tar xvfz xampp-linux-1.8.1.tar.gz -C /opt 

Replace xampp-linux-1.8.1.tar.gz with your file name. After restarting your lampp, it will work fine.

Comments

1

You may not have completely removed your old lampp instance. Please remove it and install lampp once again.

2 Comments

no i had completely removed the old one. i searched alot in google, tried many ways but nothing worked. Pls help me.
I found answer, First completly uninstall the lampp and install it once more it will work . Before uninstalling stop the lampp using the command /opt/lampp/lampp stop and then uninstall it using the command rm -rf /opt/lampp then try to install it once more .. it will work properly..
1

It might be the right permissions problem. Some solutions guide you to set it to 777 which is not recommended. Try to set it to original permissions as installed. (especially after you restore from a tar without preserving the permissions)

sudo /opt/lampp/lampp stop sudo chown nobody.root /opt/lampp/var/mysql/cdcol /opt/lampp/var/mysql/mysql /opt/lampp/var/mysql/phpmyadmin -R sudo chown nobody.nogroup /opt/lampp/var/mysql/yourdbname -R sudo /opt/lampp/lampp start 

Comments

0

Even I had the same issue. Always check for the error log before proceeding to find the root cause. Sometimes it could be file system space issue. In my case it was "/" file system was full. After clearing some space I was able to start the services without issues.

Thanks, Vishnu

1 Comment

Well, to be fair, if the issue was insufficient space, this would be an answer to it.
0

XAMPP started successfully on my side, but still got stuck at spalsh screen. It was solved by giving permission to lang.tmp file

sudo chmod 777 /opt/lampp/htdocs/xampp/lang.tmp 

Comments

0

Your previous MySQL installation might be blocking your MySQL from the xampp bundle. I also had the same problem. Just uninstall the previous MySQL. Open the terminal(Ctrl ALt T) and paste the following code:

First stop XAMPP:

sudo /opt/lampp/lampp stop 

Uninstall MySQL:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5 sudo rm -rf /etc/mysql /var/lib/mysql sudo apt-get autoremove sudo apt-get autoclean 

Start XAMPP:

sudo /opt/lampp/lampp start 

Comments

-2

I found the answer. First completly uninstall the lampp and then reinstall it. Before uninstalling, stop the lampp using the command:

/opt/lampp/lampp stop 

and then uninstall/remove it using the command

rm -rf /opt/lampp 

then reinstall it.

1 Comment

You are going to remove whole code if user don't know much about rm.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.