Reputation: 561
I have one instance PHP and MySQL installed, now i am trying to install XAMPP on my system. I am able run the PHP of XAMPP. but while starting the service, i am getting the below error. I want both the MySQl to be running by stopping the services of other.
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.
Please help, thanks
Upvotes: 19
Views: 115134
Reputation: 9
My problem was solved with this simple method:
Upvotes: -1
Reputation: 49
If it's not port conflict of 3306 with another service using the same port.
sudo /opt/lampp/lampp stop
open /opt/lampp/etc/my.cnf
sudo nano /opt/lampp/etc/my.cnf
change user to your username/user-account then restart the server
sudo /opt/lampp/lampp start
hope this helps
Upvotes: 0
Reputation: 1
select Mysql server in the xampp app and select configure, in configure, change the port to 3307 to 3306.
Upvotes: 0
Reputation: 1
change your mysql port from 3306 to 3307 maybe 3306 is being used somewhere else
Upvotes: 0
Reputation: 8051
You may install mysql default version. first, remove the MySQL server using the following command:
sudo apt-get remove mysql-server
sudo apt-get autoremove
Upvotes: 0
Reputation: 21
If apache and mysql datbase both stoped then run following commands
Stop MySql and Apache2
sudo service mysql stop
sudo /etc/init.d/apache2 stop
Restart
That works for me
Upvotes: 2
Reputation: 41
If in your system already running the php and mysql then first you have to stop Mysql and apache2 then restart them using installed xampp.
First stop MySql and Apache2 from running system :
#1 sudo service mysql stop
#2 sudo /etc/init.d/apache2 stop
Now restart the Xampp :
#1 sudo /opt/lampp/lampp start
Hope! This will work for you.
Upvotes: 0
Reputation: 69
I was able to resolve my issue when I found out that the service "mysqld" was running in parallel on port 3306.
I was able to find this information out by running "netstat -tulpn | grep 3306" in the terminal, which showed that "mysqld" was running. Which was suggested by @Adobe, thanks.
I then ran "sudo service mysqld stop" and restarted the MySQL server on the XAMPP and it worked.
Upvotes: 0
Reputation: 401
You can try this, it worked for me.
sudo /opt/lampp/lampp security
Ref: https://forums.linuxmint.com/viewtopic.php?t=246011
Upvotes: 1
Reputation: 221
All you have to do is stop Mysql and apache2 then restart them.
Stop MySql and Apache2
sudo service mysql stop
sudo /etc/init.d/apache2 stop
Restart
sudo /opt/lampp/lampp start
This should work
Cheers
Upvotes: 11
Reputation: 1018
If mysql is not starting in xampp, it might be a port conflict issue. Mysql run by default on port 3306. you need to check if another application is occupying that port. use following command to check app occupying a port
Linux: netstat -tulpn | grep 3306
Window: netstat -a -b
if you find an application occupying that port, stop the application and restart xampp. As an alternative, you can go to php.ini file or click configure in the dropdown and change the mysql port to 3307
Upvotes: 6
Reputation: 1454
I've resolved in this way:
sudo chmod -R 777 /opt/lampp
sudo chown -hR nobody /opt/lampp
sudo chmod -R 755 /opt/lampp
i stop the other service running
sudo /etc/init.d/mysql start
Upvotes: 1
Reputation: 361
All you have to do is stop Mysql and apache2 first
sudo service mysql stop
sudo /etc/init.d/apache2 stop
Then Start your
sudo /opt/lampp/lampp start
Switch to the XAMPP installation directory. Type in
cd /opt/lampp
and press ↵ Enter
Enter the "Open" command. Type in
sudo ./manager-linux-x64.run
and press ↵ Enter
Enter your password when prompted. Type in the password you usually use to log into your computer, then press ↵ Enter.
Upvotes: 36
Reputation: 39
First of all you need to install gksu with the following command:
sudo apt-get install gksu
Then, run:
gksu gedit /usr/share/applications/xampp-control-panel.desktop and save the following code in the file.
(You are using 64 bit system so there is no need to change anything, simply do copy paste)
[Desktop Entry]
Note: For 32 bit xampp type "manager-linux.run" at place of "manager-linux-x64.run"
Run following command in terminal:
sudo apt-get update Now check applications, its icon has been created.You can get it from search
Upvotes: 0
Reputation: 151
This helped me...
Following content is from MySQL Database cannot start on XAMPP for Mac
1. Open XAMPP Installation Directory
2. Open "etc" Folder
3. Find "my.cnf" file and open it in any text editor
4. Change Port from 3306 to 3307 (if you have installed skype or other apps)
5. Add "innodb_force_recovery=1" under "myisam_sort_buffer_size=8M"
6. Save "my.cnf" file
7. Open xampp:-
8. Goto Computer(opt)> Open lampp folder(Search "lampp" if u can't see lampp folder)> Open manager-linux.run
9. In XAMPP Click on "Manage Server" Tab> Click on "Mysql Database"> Click on "Configure"> Change Port from 3306 to 3307> save and start the mysql database.
You Get A message "Starting MySQL SUCCESS! "
Upvotes: 15
Reputation: 9
This is the easiest fix that worked for me after trying a billion suggestions from various forums. First you need to update your kernel to the latest stable version, 3.19 (You really need to do this for it to work without any issues even in future (after updates)).
Go to http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-vivid/
Look for the generic ones (ignore lowlatency)
Install xampp directly from the apachefriends site: https://www.apachefriends.org/index.html
Lastly, click on start all in the 'Manage Servers' tab and watch them all start, mysql database, Proftpd and Apache web server. This also fixes the phpmyadmin (browser) error 2002.
Upvotes: 0
Reputation: 93
I have a same problem.
my way is
to check user on folder
$ cd /opt/lampp/var/mysql
$ ls -la
to change user on folder for all files and folder
$ sudo chown -R mysql:mysql *
and 1 file based on your computer ex:
$ sudo chown -R mysql:root emild-desktop.err
emild-desktop.err is log error of my pc
Copy Paste your htdocs folder on /opt/lampp
Restart lampp service.
$ sudo /opt/lampp/lampp start
Upvotes: 2
Reputation: 59
You may run,
sudo stop mysql
in terminal to stop mysql service and restart XAMPP.
Upvotes: 0
Reputation: 561
Thanks for the answers. I was tryin to start the mysql service when already one is already running. Stop the instance of the mysql and apache before starting the XAMPP mysql and apache
sudo service apache2 stop
sudo service mysql stop
then
sudo /opt/lampp/lampp start
Upvotes: 6
Reputation: 3288
If you're running ubuntu why on earth are you using XAMPP?
sudo apt-get install apache2 mysql-server phpmyadmin php5;
cd;mkdir www
pico /etc/apache2/sites-available/default
change document root to the www directory you just made which should be something like /home/yourusername/www/
service apache2 restart
Congratulations you're now running a full blown LAMP stack properly on a linux machine. http://localhost/
and http://localhost/phpmyadmin/
Upvotes: 20