XAMPP Mysql and PHPmyAdmin Issues
After you install XAMPP using the tutorial steps provided here there are two common issues that can occur which would prevent the working of MySQL and PHPMyAdmin. Lets us tackle the two problems as follows.
Problem 1: XAMPP: Couldn’t start MySQL!
As suggested in the tutorial, you can start XAMPP server using /opt/lampp start and you are supposed to get the output as below:
Starting XAMPP 1.7.3a…
LAMPP: Starting Apache…
LAMPP: Starting MySQL…
LAMPP started.
But instead you might see something like below:
Starting XAMPP 1.7.3a…
LAMPP: Starting Apache…
LAMPP: Starting MySQL…
XAMPP: Couldn’t start MySQL!
LAMPP started.
Solution 1:
This is caused due to permission issues and you can solve it using the following steps.
a) In the terminal su to root : su
b) Provide the root password when prompted
c) chown -hR root /opt/lampp (Change the path as required)
d) chmod -R 777 /opt/lampp
e) /opt/lampp/lampp restart
This should give you an output something like :
Starting XAMPP for Linux 1.7.3a…
XAMPP: Starting Apache with SSL (and PHP5)…
XAMPP: Starting MySQL…
Warning: World-writable config file ‘/opt/lampp/etc/my.cnf’ is ignored
Warning: World-writable config file ‘/opt/lampp/etc/my.cnf’ is ignored
XAMPP: Starting ProFTPD…
XAMPP for Linux started.
Additional steps to be followed:
a) vi /opt/lampp/etc/php.ini
b) uncomment ; session.save_path = /tmp
to session.save_path = /tmp
Problem 2:
When you try to access mysql you would get an error as : “cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly”
If the above said problem was already solved then you might encounter the new problem which says,
“Wrong permissions on configuration file, should not be world writable!”.
Solution 2:
a) Open terminal
b) get root access
c) Change permission of config.inc.php file : chown a-w /opt/lampp/phpmyadmin/config.inc.php
This solution worked on Mandriva 2007 spring running Gnome on Linux kernel 2.6.17-13mdv.
