My.cnf is the file used by MySQL to load its configuration. This file may exist in various locations, and the location determines whether the my.cnf options are per-user or global.
Questions tagged [my.cnf]
47 questions
12
votes
8 answers
MySQL where's the my.cnf path?
I've managed to locate my install directory for MySQL: /usr/local/mysql/
Where can I find the path to my.cnf to know where I should configure the server? I've tried creating a /etc/my.cnf(as shown below) and it had no…

Ben
- 3,800
- 18
- 65
- 96
10
votes
7 answers
mysql my.cnf ignored
The Issue
I'm trying to modify a my.cnf value on my production server but the changes aren't taking effect after a sudo service mysql restart, using an exact copy of the my.cnf (downloaded and replaced original) on my development server the changes…

mr12086
- 245
- 1
- 3
- 8
7
votes
3 answers
MySQL Not Reading Symlinks for Options Files my.cnf
I'm running MySQL 5.5 on Ubuntu.
There is a my.cnf file in /etc/mysql/ where I would expect it to be. - Great!
For debian installations of mysql it is recommended that you do not edit the my.cnf file. There is an IncludeDir directive in the…

HenryHayes
- 173
- 1
- 5
6
votes
1 answer
Why does MySQLTuner show query_cache_size (=0)?
Why does MySQLTuner show query_cache_size (=0)?
In the my.cnf, I have
query_cache_type = 1
query_cache_size = 16M
query_cache_limit = 2M
And MySQLTuner's report show this
[!!] Query cache may be disabled by default due to mutex contention.
[OK]…

BlueDogRanch
- 143
- 1
- 2
- 9
6
votes
2 answers
my.cnf missing on all directories after new mysql installtion
Title says it all. I previously had mysql version 5.1 on my CENTOS 6 x86_64 OS.
I attempted to remove mysql 5.1 and replace it with an install of mysql 5.6.
Here is my uninstall process for mysql 5.1:
yum remove mysql
yum remove mysql-devel
yum…

SephMerah
- 159
- 1
- 2
- 8
3
votes
4 answers
Joins performed without indexes: 5568
I was trying to do mysql optimization. Yesterday the CPU usage was 100%.
I am trying to optimize with mysqltuner but this time I gave a mysqltuner warning.
I have a high-traffic db. 500-600 connections in a day. Maybe more.
How can I fix it?
[!!]…

Tota1907
- 39
- 1
- 1
- 4
3
votes
2 answers
I can't connect to mysql on a remote server
I'm trying to connect from an Ubuntu server to a RHEL6 server using mysql. I've tried telneting into the server as well as trying to connect with mysql. I've tried commenting out the bind-address but didn't have any success with that either. I don't…

eisaacson
- 525
- 3
- 8
- 20
3
votes
4 answers
MySQL Strict Mode Stuck On
After upgrading to MySQL 5.5 from the Remi-DB (CentOS 6) we've been getting an issue where every reboot our SQL server will set itself back to strict mode:
mysql> SELECT @@GLOBAL.sql_mode;
+--------------------------------------------+
|…

Matthew Salsamendi
- 318
- 4
- 5
- 15
2
votes
3 answers
FreeBSD default MySQL basedir, port, etc., for my.cnf
I'm working on a FreeBSD 9.2 server and have run mysqltuner.pl to check the memory and cache needs of MySQL. Now I need to add a my.cnf file to FreeBSD so it uses that instead of the auto cnf file.
I can copy the my-default.cnf this way:
cp…

markratledge
- 519
- 5
- 13
- 26
2
votes
1 answer
my.cnf being ignored (fedora)
Because I'm getting errno=24 on a few queries in my testing environment (Fedora 18 running mysql-server.x86_64 5.5.31-1.fc18), I'm trying to increase the open files limit for mysqld.
I have already changed the OS limits in /etc/security/limits.conf,…

kaz
- 141
- 3
2
votes
2 answers
PHP can't connect to MySQL after changing datadir
I have changed my MySQL datadir and socket location in my /etc/my.cnf as follows:
[mysqld]
#--default datadir
#datadir=/var/lib/mysql
#--new datadir
datadir=/data/lib/mysql
#--default socket
#socket=/var/lib/mysql/mysql.sock
#--new…

ashiina
- 145
- 2
- 5
2
votes
4 answers
Centos MySQL optimization 4gb ram
I am using Centos 6 64bit on vps with 4gb ram. 1 wordpress website and 2 wallpapers script websites. Wordrpess have 10k visits daily. Site is slow.
My.cnf
# Example mysql config file for large systems.
#
# This is for large system with memory =…

user156220
- 21
- 1
- 2
1
vote
2 answers
MySQL "my.cnf" variables not updating after Ansible run
i'm creating a simple Ansible playbook for my Project where i'm installing MySQL on an Ubuntu VM.
As part of this setup i'm creating a custom my.cnf file in /etc/my.cnf and it looks like this after the jinja2 template is done parsing…

JonnySerra
- 111
- 5
1
vote
0 answers
Strange behaviour as logs are being written into my.cnf
I understand this is extremely strange and just started to happen out of the blue. I noticed while looking at my server disk usage that it was going pretty high. Turns out that /var/lib/mysql/my.cnf is being filled with logs... yes, if I vi my.cnf I…

Ricardo
- 11
- 1
1
vote
1 answer
Are both /etc/my.cnf and /etc/mysql/my.cnf needed?
I recently setup a new web server with Ubuntu 12.04. I noticed that there are two my.cnf files, and MySQL successfully reads both:
/etc/my.cnf
/etc/mysql/my.cnf
Do I need to keep both of these files?
If possible, I would like to simply merge the…

Leo Galleguillos
- 177
- 8