How To  

You may get this error after trying to backup your mysql database using mysqldump command

warning: World-writable config file /etc/my.cnf is ignored

or sometime when yoy startĀ  Xampp, you may see error like this:

Starting XAMPP for Linux …
XAMPP: Starting Apache with SSL (and PHP5)…
XAMPP: Starting MySQL…
XAMPP: Starting ProFTPD…
warning: World-writable config file /etc/my.cnf is ignored
warning: World-writable config file /etc/my.cnf is ignored
warning: World-writable config file /etc/my.cnf is ignored
XAMPP for Linux started.

This isĀ  just a waring and can be ignored but here is the solution how to fix it

MySQL is deliberately ignoring your config file (my.cnf) as a safety precaution because the file can be over-written by a malicious user.

To see the file’s permissions, use the following command.To see the file’s permissions, use the following command.

ls -l /etc/my.cnf
in response, you will see:

-rw-r–r– 1 4998 Apr 2 2010 /etc/my.cnf

If the first part of the line looks like “-rw-rw-rw-” or “rwxrwxrwx”, the file’s permissions are “World-writable”.

To fix this problem, use the following command to change file’s permissions

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

Note: if you looking for a way to backup your Mysql database via ssh and mysqldump, then please read my previous post about how to backup your online website and clone or sync it to local website

Do you need farther help on this topic? Contact me
Do you need Professional coder? Hire me
Looking for different WordPress plugin? Try Wishlist member

Andy is one of core WordPress WishList Member Developer. He is in love with WordPress and fun of turning new ideas to WordPress plugin or theme.

Add your comment

  1. Roy
    July 9, 2010
    4:57 pm

    Hello, I am using fat32 FS.
    chmod 644 /opt/lampp/etc/my.cnf
    But it doesn’t work!
    Is there a way to make it work on FAT32 file sysyem?

  2. JC
    February 12, 2011
    5:15 pm

    Thank you very much

    This solution fixed my problem with MySQL and Joola!

  3. Thorn
    February 25, 2011
    2:28 am

    Roy, the FS is not your problem, the problem it’s that probably you mysql directory is not /opt/lampp/etc/my.cnf try with /etc/mysql/my.conf maybe can resolve, good luck!!

  4. Arun
    April 1, 2011
    2:07 pm

    Thanks for your post. This was really helpful when googling to fix the same issue like mad.

  5. Artur
    April 7, 2011
    11:40 am

    Hay Roy!
    In fat32FS all files have rights 777 everytime! You can set rights 644 in Linux (ext2/ext3/ext4) FS.

  6. NaiveGeek
    May 11, 2011
    11:40 pm

    thanks dude it helped me

  7. Balaji
    June 6, 2011
    5:32 pm

    Works great .. thanks

  8. khaleel khan
    July 1, 2011
    3:20 pm

    hi my name is khaleel,

    In mysql database is crashed, when we have to run the mysql it shows warning message like warning: World-writable config file /etc/my.cnf is ignore. PLEASE GIVE ME SUGGESTION TO RECOVERY MY DATABASE.

  9. karibe
    February 15, 2012
    12:02 pm

    sudo chmod 644 /etc/mysql/my.cnf
    sudo chmod 644 /etc/mysql/conf.d/mysqld_safe_syslog.cnf

    that should do it

  10. Benyella
    September 25, 2012
    4:32 pm

    this is lovely I just ran the command chmod 644 /opt/lampp/etc/my.cnf and all works fine thanks

  11. mercy
    August 2, 2014
    6:56 pm

    Thanks a lot for the guide,it worked.

RSS feed for comments on this post. TrackBack URL

Add your comment.