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/
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
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
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
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.
You may not have completely removed your old lampp instance. Please remove it and install lampp once again.
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