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.

Cannot locate my.cnf

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

Tags:
  1. RomainB

    RomainB Member

    Joined:
    Dec 15, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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:
    322
    Likes Received:
    24
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    By default you’ll find MySQL’s configuration file at: /etc/my.cnf
     
  3. RomainB

    RomainB Member

    Joined:
    Dec 15, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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:
    322
    Likes Received:
    24
    Trophy Points:
    18
    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
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    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.
     
Loading...

Share This Page