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!

Cannot locate my.cnf

Discussion in 'Database Discussion' started by RomainB, Aug 25, 2016.

Tags:
  1. RomainB

    RomainB Member

    Joined:
    Dec 15, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    51
    Hello

    I need to do some modifications of Mysql's configurations but I cannot locate my.cnf file.

    Do you know how to find it ?

    My server : CentOs 7

    Thank you
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    42
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    By default you’ll find MySQL’s configuration file at: /etc/my.cnf
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. RomainB

    RomainB Member

    Joined:
    Dec 15, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    51
    The file is not there.

    vi /etc/my.cnf : The system asks me to create a file with this name...
     
  4. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    42
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,

    Please check MySQL’s configuration file at /etc/mysql/my.cnf

    If not found then run below command to find my.cnf file
    Code:
    whereis my.cnf
    
    or
    find / -name my.cnf
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify if you are logged in via SSH as the "root" user? You can only edit the MySQL configuration with root access to the system.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice