my.cnf file missing and cannot be found at any directory
Asked Answered
Z

5

6

I recently removed mysql 5.1 an installed mysql 5.6 on my CENTOS 6 x86 OS. When I try to look for the my.cnf file it is missing from these directories:

mysqld --verbose --help | grep -A 1 "Default options"

=

/etc/my.cnf, /etc/mysql/my.cnf, and ~/.my.cnf.

Now I went to my mysql home directory which is /var/lib/mysql to find the .cnf file but all I found was auto.cnf.

Does anyone have any ideas? Could I just download a my.cnf file and place it in one of those directories?

Zestful answered 21/9, 2012 at 11:36 Comment(0)
I
4

sudo updatedb && locate my.cnf

Immanent answered 21/9, 2012 at 11:38 Comment(2)
What woud be the CENTOS OS way of doing it? :) yum updatedb && locate my.cnf? I tried locate my.cnf but it says /var/lib/mlocate/mlocate.db no such file or dir.Zestful
yum is to manage (install, remove) software, try to locate the file with root userImmanent
S
0

if you are having trouble with locate

as root: find / -name my.cnf

how did you install mysql? with yum?

Seleucia answered 28/6, 2014 at 13:11 Comment(1)
A -type f would speed things up dramatically.Aggrade
P
0

I am running Centos 6.5. When I went to install MySQL-server.X86_64 5.6.12-2.el6, it put my.cnf in /usr. /usr/my.cnf ? What the hell is my.cnf doing in /usr ?

I found it using find / -iname my.cnf -print

Pyrochemical answered 18/7, 2014 at 20:55 Comment(0)
S
0

The location is changed to /mysql.d, and the filename is changed to something like mysqld.cnf. Also, there's a similar question somewhere (maybe duplicate here or there).

Scullion answered 16/10, 2017 at 5:37 Comment(0)
B
0

on windows the my.ini is stored under: C:\ProgramData\MySQL\MySQL Server 8.0\my.ini

Bienne answered 6/12, 2023 at 12:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.