Ubuntu – MySql is not starting xampp on ubuntu


I have recently migrated to ubuntu and I have intalled Xampp for Ubuntu .. lampp
as per the instructions mentioned on xampp website, i have installed the lampp

lampp Installation

And it was starting good.. when i changed the /opt/lampp permission mode to 777 by using from Terminal as chmod 777 /opt/lamp.

After this when i start the lampp, it gives the below error in images in Terminal as well as web page error

Terminal Error Image

enter image description here

web page error when i typed localhost/phpmyadmin it gives below error

enter image description here

how can i revert the changes or
how can i start the mysql server service

Best Answer

  • If you did a chmod 777 please do a

    chmod 775 /opt/lamp

    Regarding the error during startup...

    MySQL complains about my.cnf being world-writeable. MySQL does not use the config file if you change /opt/lamp/etc/my.cnf to **7. To fix that specific problem do a...

    chmod 644 /opt/lampp/etc/my.cnf

    and MySQL will use it again.

    Regarding permissions...

    For directories 775 (or even 755) is more than enough and for files 664 (or even 644) is more than enough. Using 777 will let people from the whole world access your files where they can alter and execute those files.

    And a final note...

    I see XAMPP being mentioned in your image. I would advice not to use an external LAMP setup. There is a perfectly working LAMP version in Ubuntu Software Center that is custom made to work with Ubuntu.

  • Related Question