Questions tagged [my.cnf]

Configuration file for MySQL programs, particularly for the mysqld server.

MySQL programs read one or more option files in .ini format, with sections specific to each program.

The global option file, usually /etc/my.cnf, frequently contains options for the mysqld server and sometimes the mysqldump or isamchk maintenance programs. There are many such options, with complex interactions; fine-tuning them for your specific needs can be out of scope for this site, but ServerFault may be able to help with some general situations.

The user-specific option file, usually ~/.my.cnf, is not often necessary, but can reduce command-line length or help tailor the mysql client to your preferences. For specific advice, SuperUser is probably a better place to look.

234 questions
2
votes
2 answers

How to determine which my.cnf mysql is using

Is there a way I can figure out which my.cnf mysql is currently using? The reason is because it's using the correct socket file to connect, but I can't figure out exactly which (if any) my.cnf it's using or trying to use so I can manually set the…
joeellis
  • 2,745
  • 7
  • 28
  • 45
2
votes
1 answer

mysql setting variable innodb_flush_method to O_DSYNC or O_DIRECT

In my configuration innodb_flush_method=O_DSYNC from O-DIRECT reduces about 75% the iowait, and accordingly this the load. Should I set another variables besides innodb_flush_method to reduce more the iowait? My configuration file…
zsola3075457
  • 177
  • 4
  • 14
2
votes
1 answer

Different settings in my.cnf are causing "max key length is 1000 bytes" error

Edit: This may be a 5.0-specific bug. (I'm on 5.0.83). Removing the innodb_log_file_size setting gets rid of the problem. Which makes complete sense. Not. Googling about finds a handful of similar, but not identical problems in 5.0 that were…
Brian Deacon
  • 21,384
  • 13
  • 39
  • 41
2
votes
1 answer

innodb_read_io_threads missing on MySQL 5.1.69

I have a production 64-bit MySQL DB server (version 5.1.69 - Source distribution) with 8 cores and 8 GB RAM, and I want it to fully utilize all cores and all available memory. I use InnoDB and I read that I should set the following in my.cnf…
Aviram
  • 3,017
  • 4
  • 29
  • 43
2
votes
2 answers

Out of memory MySQL with 24GB Server

I have come across an annoying problem. I have made a system and now users are telling me that it is giving them the message: Out of memory (Needed 268435427 bytes) The entire database is 12MB in size and the query that is having the problem has ran…
imperium2335
  • 23,402
  • 38
  • 111
  • 190
2
votes
1 answer

Reject certain query in mysql

I can't find where in the code a query is triggered and was wondering if there is a mysql configuration that will reject that query when it is triggered? For example, in my situation it is UPDATE table SET col1 = NULL, col2 = NULL, col3 = NULL ...…
eistrati
  • 2,314
  • 6
  • 26
  • 35
1
vote
1 answer

Making MySQL work with utf-8 in my.cnf configuration file

I'm having troubles trying to change the character sets in MySQL. I'm trying to edit the file "/etc/my.cnf" with the information taken from "http://stackoverflow.com/questions/3513773/change-mysql-default-character-set-to-utf8-in-my-cnf". The…
Diego
  • 296
  • 2
  • 16
1
vote
0 answers

ERROR Found option without preceding group in config file /etc/my.cnf at line 1. ERROR Fatal error in defaults handling. Program aborted

I am getting this error when i run mysql -uroot after installing mysql through brew install mysql mysql: [ERROR] Found option without preceding group in config file /etc/my.cnf at line 1. mysql: [ERROR] Fatal error in defaults handling. Program…
vadersuv
  • 11
  • 1
1
vote
0 answers

MariaDB 10.5 changing sql_mode in .cnf does not change @@sql_mode, why?

Fedora Desktop 35 running MariaDB 10.5, completely fresh install from about a month ago. Why is my change to /etc/my.cnf/mariadb-server.cnf sql_mode changing @@GLOBAL.sql_mode but not @@sql_mode? I'm trying to remove STRICT_TRANS_TABLES from my…
Neek
  • 7,181
  • 3
  • 37
  • 47
1
vote
1 answer

my.cnf in kubernetes configmap is not recognized by mysql pod

my.cnf in kubernetes configmap is not recognized by mysql pod. This is mysql.yaml apiVersion: apps/v1 kind: StatefulSet metadata: namespace: ***** name: ***** spec: serviceName: mysql-service replicas: 1 selector: matchLabels: …
loanshark
  • 105
  • 2
  • 8
1
vote
1 answer

Can you tell me why MySQL 8 is not using my.cnf on macOS Mojave?

I am trying to setup the MySQL I have installed on my Mac. Mac is 10.14.6 Mojave. MySQL is 8.0.21. I have created a my.cnf file in the main mysql directory, which is /usr/local/mysql. I have set the path to the config file using the system…
Mark Ogier
  • 41
  • 1
  • 5
1
vote
1 answer

MySQL disconnects when innodb_buffer_pool_size > 75% RAM

For now innodb_buffer_pool_size is set to 12GB (out of 16GB memory), and when I try to increase this value (12.5GB or even up to 13G) to max out performance, MySQL suddenly disconnects itself from the client. I'm having hard time figuring out what…
pepsi
  • 181
  • 1
  • 13
1
vote
1 answer

R using RMariaDB unable to connect with .mylogin.cnf

I'm developing a script in RStudio which connects to local MySQL Server using the R package RMariaDB (not RMySQL - for other reasons though the outcome is the same). I can both connect via storing the password in the script like: localuserpassword…
Oscar_W
  • 11
  • 2
1
vote
1 answer

MariaDB on HomeBrew: Enabling Network Access

I have just installed MariaDB 10.4 using Home Brew. I was finally able to set the root password, and I am now trying to enable network access. I think have added the correct directive: bind-address=0.0.0.0 The thing is, is it to the correct my.cnf?…
Manngo
  • 14,066
  • 10
  • 88
  • 110
1
vote
1 answer

Docker and MariaDB/MySQL — Permanently Editing my.cnf to enable remote access

I am running Docker on a Macintosh, and have installed the MariaDB image. I would like to access it from another machine on the LAN. I understand that the solution is to enable bind-address=0.0.0.0 (or something similar) in /etc/mysql/my.cnf. I…
Manngo
  • 14,066
  • 10
  • 88
  • 110