LAMPP mysql can't create err file and doesn't have uninstall file
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.
Related videos on Youtube
Sky
Updated on September 18, 2022Comments
-
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 withapt-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 about 7 years1) 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. Usechmod ug+w /opt/lampp/var/mysql && chmod ug+w /opt/lampp/var/mysql/MyName.err
. -
George Udosen about 7 yearsYou 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 about 7 years@SamuelSantana : chmod: changing permissions of '/opt/lampp/var/mysql': Operation not permitted
-
Samuel about 7 years@Sky You don't own the dir/file, so you'll need to add
sudo
, sorry. -
Sky about 7 years@SamuelSantana : chmod: cannot access '/opt/lampp/var/mysql/MyName.err': No such file or directory
-
Samuel about 7 yearsAh!, the file doesn't exist, XAMPP never got to create it. Doesn't matter, now try running xampp again.
-
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 about 7 yearsI created a chat room: chat.stackexchange.com/rooms/info/55256/…
-
Sky about 7 yearsI need 20 rep to talk?
-
Samuel about 7 yearsOh dang... well, you can edit your answer and post the things that I asked you in the chat.
-
Sky about 7 yearsI 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 over 5 yearsI'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 almost 4 yearsI'm getting error as
chown: invalid user: ‘mysql:mysql’
-
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 almost 4 years@SudhakarKrishnan Use
sudo adduser mysql
to create mysql user. Now use the this codesudo chown mysql:mysql -R /opt/lampp/var/mysql
to change mysql dir user. Then give the correct permissionssudo chmod -R 755 /opt/lampp/var/mysql
. At the end of this, start your mysql. -
Sudhakar Krishnan almost 4 years@Hamidreza Thankyou, it worked for me.