Cek this syntax:

root@ubuntu:/opt/lampp# ./lampp startmysql
XAMPP: Starting MySQL...ok.
root@ubuntu:/opt/lampp# ./lampp status
Version: XAMPP for Linux 1.8.3-3
Apache is running.
MySQL is not running.
ProFTPD is running.

I already start mysql yet it's still unable to run. Why is it?

Dani AI

Generated

The symptoms in this thread — XAMPP saying "started" while the bundle's status shows MySQL not running — usually mean the bundled daemon either starts then immediately exits, or it cannot bind to the socket/port because a system MySQL or leftover socket/PID is in the way. 's /etc/init.d listing and ’s note about service names point to a possible system vs. bundled conflict; 's recommendation to check installed packages is also relevant for confirming whether a system MySQL exists.

Useful diagnostics (look for errors first, they typically tell the story):

sudo tail -n 200 /opt/lampp/var/mysql/*.err
ps -ef | grep [m]ysqld
sudo ss -ltnp | grep :3306 || sudo netstat -plnt | grep 3306
grep -E 'socket|datadir' /opt/lampp/etc/my.cnf
df -h /
ls -ld /opt/lampp/var/mysql

Common outcomes and next steps (summary):

  • Log shows InnoDB or data-file corruption → use innodb_force_recovery temporarily to extract data, then restore from clean files/backups.
  • Permission, PID or socket errors → fix ownership/permissions for XAMPP's mysql datadir and remove stale .pid/.sock files before restart.
  • Port 3306 already bound → either stop/disable the other MySQL instance or change XAMPP's MySQL port and update client/phpMyAdmin settings.
  • AppArmor/SELinux denials will appear in kernel/syslog and must be adjusted or set to complain mode for testing.

In most cases the error log under /opt/lampp/var/mysql plus the process/port check identifies the root cause and points to the correct fix.

Recommended Answers

All 7 Replies

You need to start the mysqld service: sudo service mysqld start

root@ubuntu:/opt/lampp# sudo service mysqld start
mysqld: unrecognized service

----------------------------

root@ubuntu:/opt/lampp# ./lampp startmysql
XAMPP: Starting MySQL...ok.
root@ubuntu:/opt/lampp# ./lampp status
Version: XAMPP for Linux 1.8.3-3
Apache is running.
MySQL is not running.
ProFTPD is running.

As a sanity check:

dpkg -l | grep mysql

What is the output?

@davy
This means that the mysql server package has not been installed on your system. The mysql package is just the client. The mysqld service is installed as part of the mysql-server package.

You indicate that lamp started mysql ok. That may be a red herring. Look in /etc/init.d for anything that looks like mysql...

ls /etc/init.d

acpid              lightdm                      rfkill-store
acpi-support       modemmanager                 rsync
alsa-restore       module-init-tools            rsyslog
alsa-store         mysql                        

First stop the curepted running mysql. .

sudo service mysql stop

You have reconfigure the mysql installation. .

sudo dpkgreconfigure mysql

After that you have to set the password for mysql. .
and start mysql. .

sudo service mysql start

For MySQL 5.1 and such, the command "service mysqld start" is proper. For 5.6 (and possibly 5.5) it was changed to "service mysql start" - note the difference between mysqld and mysql in the commands.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.