Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Mysql is ignoring /etc/my.cnf setting

Discussion in 'Database Discussions' started by Dedan Irungu, Oct 19, 2017.

  1. Dedan Irungu

    Dedan Irungu Registered

    Joined:
    Oct 19, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nairobi
    cPanel Access Level:
    DataCenter Provider
    I have tried to disable xxx by setting it to zero(0) but it mysql is ignoring the setting provide in /etc/my.cnf.

    [mysqld]
    skip-name-resolve=0

    I have attempt to introduce errors by removing [mysqld] to see if file is called and I the system did show errors on restart which means the file is called.

    How can I make it work and disable skip-name-resolve
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    582
    Likes Received:
    177
    Trophy Points:
    43
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    As well as an /etc/my.cnf , you may have a /usr/my.cnf file that is read after the /etc/my.cnf
     
  3. Dedan Irungu

    Dedan Irungu Registered

    Joined:
    Oct 19, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nairobi
    cPanel Access Level:
    DataCenter Provider
    Thank for quick response.

    I have check in the server and file /usr/my.cnf does not exist. The other file that exists is /usr/etc/my.cnf and is empty.

    All mysql .cnf files are listed below.

    sudo find / -name "*my*cnf"

    /root/.my.cnf
    /usr/local/cpanel/scripts/check_users_my_cnf
    /usr/etc/my.cnf
    /usr/share/mysql/my-default.cnf
    /usr/share/doc/MySQL56-server-5.6.37/my-default.cnf
    /usr/share/mysql-test/include/default_my.cnf
    /usr/share/mysql-test/include/default_mysqld.cnf
    /usr/share/mysql-test/include/default_mysqld_autosize.cnf
    /usr/share/mysql-test/suite/rpl_ndb/my.cnf
    /usr/share/mysql-test/suite/rpl/extension/bhs/my.cnf
    /usr/share/mysql-test/suite/rpl/my.cnf
    /usr/share/mysql-test/suite/federated/my.cnf
    /usr/share/mysql-test/suite/ndb_team/my.cnf
    /usr/share/mysql-test/suite/ndb/include/ndb_add_node_mysqld.cnf
    /usr/share/mysql-test/suite/ndb/ndb_config_mycnf1.cnf
    /usr/share/mysql-test/suite/ndb/my.cnf
    /usr/share/mysql-test/suite/ndb/ndb_config_mycnf2.cnf
    /usr/share/mysql-test/suite/ndb_binlog/my.cnf
    /usr/share/mysql-test/suite/ndb_big/my.cnf
    /usr/share/mysql-test/suite/ndb_rpl/my.cnf
    /usr/share/mysql-test/t/mysql_client_test_embedded.cnf
    /usr/share/mysql-test/std_data/.mylogin.cnf
    /etc/my.cnf
     
  4. Dedan Irungu

    Dedan Irungu Registered

    Joined:
    Oct 19, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nairobi
    cPanel Access Level:
    DataCenter Provider
    I have found a solution.

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

    The reasons for this situation is: MySQL deliberately not let user permissions override my.cnf, default is 644, namely -rw-r--r--, if the permissions that are not 644, will appear this kind of circumstance.

    To change it use this command.

    sudo chmod 600 /etc/my.cnf
     
  5. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    582
    Likes Received:
    177
    Trophy Points:
    43
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I would like to draw your attention to a post (admittedly quite old) on these forums that you may want to review before doing anything:
     
    #5 rpvw, Oct 19, 2017
    Last edited: Oct 19, 2017
  6. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    27
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    As rpvw pointed out, disabling skip-name-resolve can certainly cause issues; at the very least for remote MySQL servers. I don't think disabling this is as big a performance boost as optimizing queries or databases.
     
Loading...

Share This Page