Saturday, April 13, 2013

XAMPP: Couldn't start MySQL

Remove Error : XAMPP: Couldn't start MySQL

Run following commands in terminal
$ sudo chown -hR root /opt/lampp $ sudo chmod -R 777 /opt/lampp $ sudo /opt/lampp/lampp restart
After running above commands when you try to start XAMPP and it gives following error :

"Warning: World-writable config file ‘/opt/lampp/etc/my.cnf’ is ignored"

To Remove above error, Run following command in terminal
$ sudo chmod 755 /opt/lampp/etc/my.cnf

After running above command when you try to start XAMPP again and it gives following error :

Wrong permissions on configuration file, should not be world writable!

To Remove above error, Run following command in terminal
$ sudo chmod 755 /opt/lampp/phpmyadmin/config.inc.php

Recover /etc/passwd file in Linux


/etc/passwd is deleted accidently, Recover the file.

There is a backup file of /etc/passwd in same directory with name passwd-
$ sudo cp /etc/passwd- /etc/passwd $ sudo chmod 644 /etc/passwd

Lock the file using
$ sudo pwck -q

If you are not root user and do not use sudo before pwck -q, it will give error
pwck: cannot lock /etc/passwd; try again later.


External USB Hard Disk (HDD) NTFS not detected in CentOS

External (USB) hard disk is not detected :

Install NTFS package in centOS


$ yum install fuse fuse-ntfs-3g

If it does not work, download rpm file and install using
ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/ntfs-3g-2011.4.12-5.el6.x86_64.rpm


$ rpm -i filename