• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution

    Trying to find the my ini file

    How do I find the my.ini file for a MySQL database?
    9 REPLIES 9
    Super User III
    Super User III

    Re: Trying to find the my ini file

    @dylanmerte 

     

    If you have cPanel, the .ini file is usually found in the public_html folder, which you can access using the File Manager. If there's not one there, you simply create your own and populate the data you need. Typically, this will be either a user.ini or a php.ini. 

     

    If you're using something similar to cPanel, the easiest thing to do is look up the file management system the control panel uses.

     

    Hope that helps.



    I am a GoDaddy End User - Just Like You
    Check out my site! | I drink and I know things. Especially about websites and web hosting.
    * Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

    Once your issue is resolved,
    please be sure to come back and click accept for the solution

    Get Better Support on the Community Boards!
    Etiquette When Asking for Help from the Community


    Super User III
    Super User III
    Solution

    Re: Trying to find the my ini file

    @dylanmerte 

    This assumes you are on a Linux Server

    In WHM - go to terminal

    run

    locate my.ini OR locate my.cnf

    If you get command not found 

    yum -y install mlocate

    Then

    updatedb

     

    If you are a windows server if you go to the services window and then find MySQL select the properties and you should see the path to executable and that should show you the my.ini file path



    I am a GoDaddy End User - Just Like You
    Check out my site! | I currently manage over 300 WordPress Websites
    * Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

    Once your issue is resolved,
    please be sure to come back and click accept for the solution

    Get Better Support on the Community Boards!
    Etiquette When Asking for Help from the Community

    Re: Trying to find the my ini file

    @PL281 

    I entered the first command and it returned with, 

     

    can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

     

    So I assume that means there is not one, so I then put in the second command and it returned with, 

     

    Loaded plugins: fastestmirror, universal-hooks
    Setting up Install Process
    Loading mirror speeds from cached hostfile
    * EA4: 103.192.173.8
    * cpanel-addons-production-feed: 103.192.173.8
    * cpanel-plugins: 103.192.173.8
    * base: centos-distro.cavecreek.net
    * extras: mirror.fileplanet.com
    * updates: centos-distro.cavecreek.net
    EA4 | 2.9 kB 00:00 ...
    cpanel-addons-production-feed | 2.9 kB 00:00 ...
    cpanel-plugins | 2.9 kB 00:00 ...
    base | 3.7 kB 00:00
    extras | 3.4 kB 00:00
    mysql-connectors-community | 2.5 kB 00:00
    mysql-tools-community | 2.5 kB 00:00
    mysql57-community | 2.5 kB 00:00
    updates | 3.4 kB 00:00
    Package mlocate-0.22.2-6.el6.x86_64 already installed and latest version
    Nothing to do

     

    Why does it say already installed at the end? So then I put in the third command and it returned with nothing. And then I tried entering the locate my.ini command again but it returned with nothing.

     

    So what did I do wrong, and what should I do next?

    Re: Trying to find the my ini file

    @PL281 

     

    I entered the first command and it returned with, 

     

    can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

     

    So I assume that means there is not one, so I then put in the second command and it returned with, 

     

    Loaded plugins: fastestmirror, universal-hooks
    Setting up Install Process
    Loading mirror speeds from cached hostfile
    * EA4: 103.192.173.8
    * cpanel-addons-production-feed: 103.192.173.8
    * cpanel-plugins: 103.192.173.8
    * base: centos-distro.cavecreek.net
    * extras: mirror.fileplanet.com
    * updates: centos-distro.cavecreek.net
    EA4 | 2.9 kB 00:00 ...
    cpanel-addons-production-feed | 2.9 kB 00:00 ...
    cpanel-plugins | 2.9 kB 00:00 ...
    base | 3.7 kB 00:00
    extras | 3.4 kB 00:00
    mysql-connectors-community | 2.5 kB 00:00
    mysql-tools-community | 2.5 kB 00:00
    mysql57-community | 2.5 kB 00:00
    updates | 3.4 kB 00:00
    Package mlocate-0.22.2-6.el6.x86_64 already installed and latest version
    Nothing to do

     

    Why does it say already installed at the end? So then I put in the third command and it returned with nothing. And then I tried entering the locate my.ini command again but it returned with nothing.

     

    So what did I do wrong, and what should I do next?

    Super User III
    Super User III

    Re: Trying to find the my ini file

    @dylanmerte 

     

    So you actually are on the right track - do locate my.cnf 

     

    my.ini is on the Windows user my.cnf is on the unix server

     

     



    I am a GoDaddy End User - Just Like You
    Check out my site! | I currently manage over 300 WordPress Websites
    * Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

    Once your issue is resolved,
    please be sure to come back and click accept for the solution

    Get Better Support on the Community Boards!
    Etiquette When Asking for Help from the Community

    Re: Trying to find the my ini file

    @PL281 

     

    So you know I am on a linux server. I entered the locate my.cnf command and it returned with,

     

    /etc/my.cnf
    /etc/my.cnf.d
    /root/.my.cnf
    /var/cpanel/configs.cache/_root_.my.cnf___default_equal_before_after_space_allow_undef

     

    So is that saying it located the file, and if so how do I get to it to open it?

    Super User III
    Super User III

    Re: Trying to find the my ini file

    @dylanmerte 

     

    I would do

    nano /etc/my.cnf

    I recommend nano over vi as an editor as it's a little more user (non-techie) friendly

    Here is a quick reference guide to nano  - https://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor...

     

    After you make your changes you should restart mysql 

    You should make a backup of the file before you edit it as if you are not careful with the edits you can cause your MySQL server not to load



    I am a GoDaddy End User - Just Like You
    Check out my site! | I currently manage over 300 WordPress Websites
    * Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

    Once your issue is resolved,
    please be sure to come back and click accept for the solution

    Get Better Support on the Community Boards!
    Etiquette When Asking for Help from the Community

    Re: Trying to find the my ini file

    @PL281

    I don’t feel to comfortable editing a file via the terminal.

    My reason of needing to access the file is to increase the “max allowed packets”.

    So is there something in CPanel or WHM to help access the file or that setting?

    Or I know there’s a command I could enter in MYSQL query to set it but I’d need Super Privileges, which I’m not exactly sure how to get.
    Super User III
    Super User III
    Solution

    Re: Trying to find the my ini file

    @dylanmerte 

     

    This cannot be done via cPanel or WHM - You would either need to edit the file in terminal or in terminal run the mysql command (see https://tableplus.io/blog/2018/08/mysql-how-to-modify-the-max-allowed-packet-size.html )

     

    If you are using terminal via WHM then you are in as root and should be good to go.



    I am a GoDaddy End User - Just Like You
    Check out my site! | I currently manage over 300 WordPress Websites
    * Please note that I offer free advice on this forum. If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

    Once your issue is resolved,
    please be sure to come back and click accept for the solution

    Get Better Support on the Community Boards!
    Etiquette When Asking for Help from the Community