LAMPP mysql can't create err file and doesn't have uninstall file

11,649

I think you change the owner of /opt/lampp. So you need to give owner to /opt/lampp/var/mysql. Use the following code:

sudo chown mysql:mysql -R /opt/lampp/var/mysql

I have same problem too and solved it.

Share:
11,649

Related videos on Youtube

Sky
Author by

Sky

Updated on September 18, 2022

Comments

  • Sky
    Sky over 1 year

    I am very, very new to Ubuntu and I just started using it.

    I installed Xampp server on it by downloading Xampp from their website and installing it with Ubuntu Software.

    But when I try to find it in Ubuntu Software installation list, it does not exist.

    My first problem was by starting xampp:

    cd ../../opt/lampp/
    sudo ./lampp start
    

    And I get this:

    Starting XAMPP for Linux ...
    XAMPP: Starting Apache...ok.
    XAMPP: Starting MySQL...ok.
    XAMPP: Starting ProFTPD...ok.
    myName@MyName:/opt$ /opt/lampp/bin/mysqld_safe_helper: Can't create/write to file '/opt/lampp/var/mysql/MyName.err' (Errcode: 13 "Permission denied")
    

    I was looking online for answer but for that I didn't found anything that worked...

    So I guess I should install everything by itself without xampp and now when I want to uninstall for some reason I can't and probably I do not know how because it is not installed by apt-get so I cannot uninstall with apt-get remove.

    And I searched for this also and everyone keeps talking about doing this:

    sudo /opt/lampp/uninstall
    

    But I do not have any uninstall files in entire lampp folder...

    This is the version that I downloaded and installed:

    xampp-linux-x64-5.6.30-0-installer.run
    
    • Samuel
      Samuel about 7 years
      1) What is the output of ls -l /opt/lampp/var/mysql? 2) Like error message suggests, try adding Write permission to the folder and file. Use chmod ug+w /opt/lampp/var/mysql && chmod ug+w /opt/lampp/var/mysql/MyName.err.
    • George Udosen
      George Udosen about 7 years
      You can't remove it using apt-get as you didn't install via that root. Now search for this uninstall file with" ls -al /opt/lampp | grep uninstal. You should have an uninstall fill in there
    • Sky
      Sky about 7 years
      @SamuelSantana : chmod: changing permissions of '/opt/lampp/var/mysql': Operation not permitted
    • Samuel
      Samuel about 7 years
      @Sky You don't own the dir/file, so you'll need to add sudo, sorry.
    • Sky
      Sky about 7 years
      @SamuelSantana : chmod: cannot access '/opt/lampp/var/mysql/MyName.err': No such file or directory
    • Samuel
      Samuel about 7 years
      Ah!, the file doesn't exist, XAMPP never got to create it. Doesn't matter, now try running xampp again.
    • Sky
      Sky about 7 years
      @SamuelSantana same as on start: myName@MyName:/opt$ /opt/lampp/bin/mysqld_safe_helper: Can't create/write to file '/opt/lampp/var/mysql/MyName.err' (Errcode: 13 "Permission denied")
    • Samuel
      Samuel about 7 years
    • Sky
      Sky about 7 years
      I need 20 rep to talk?
    • Samuel
      Samuel about 7 years
      Oh dang... well, you can edit your answer and post the things that I asked you in the chat.
    • Sky
      Sky about 7 years
      I may reinstall ubuntu, for some reasons it is crashing from nowhere no lags no nothing just everything freezes, i installed it 5h ago and it crashed 6 times till now
  • adadion
    adadion over 5 years
    I'm starting couldn't run mysql server right after I do change all ownership inside lampp folder to my username with sudo chown myusername:myusername -R /opt/lampp/*. Using above command, finally I could run mysql server again.
  • Sudhakar Krishnan
    Sudhakar Krishnan almost 4 years
    I'm getting error as chown: invalid user: ‘mysql:mysql’
  • Hamidreza
    Hamidreza almost 4 years
    @SudhakarKrishnan I think you haven't mysql user, Its possible you removed it. change it to your username. Please remember to use sudo at the first of command. If this doesn't work, please check next comment.
  • Hamidreza
    Hamidreza almost 4 years
    @SudhakarKrishnan Use sudo adduser mysql to create mysql user. Now use the this code sudo chown mysql:mysql -R /opt/lampp/var/mysql to change mysql dir user. Then give the correct permissions sudo chmod -R 755 /opt/lampp/var/mysql. At the end of this, start your mysql.
  • Sudhakar Krishnan
    Sudhakar Krishnan almost 4 years
    @Hamidreza Thankyou, it worked for me.