Questions tagged [my.cnf]

my.cnf is the configuration file for MySQL server, client programs, and utilities.

The process mysqld reads the file my.cnf to load startup options for the MySQL Server Instance. The corresponding file for Windows is my.ini.

Groups are created within my.cnf to specify options for different mysql client programs and utilities. Such groups include:

[mysqld]
[mysqld_safe]
[mysqldump]
[myisamchk]
[mysql]

Groups can also be created to define multiple mysql instances

Multiple my.cnf files can be used. One for the server, one for utility programs (mysqlchk, mysqldump, mysqladmin, etc.) and one for the mysql client for setting session values and password.

Example: Login using mysql client with a my.cnf that specifies that binary logging is disabled for your command line session (sql_log_bin=0) and you have the SUPER privilege.

144 questions
45
votes
3 answers

How do you calculate mysql max_connections variable?

How do you calculate mysql max_connections ? What do you take into consideration ?
Gabriel Solomon
  • 985
  • 2
  • 10
  • 13
21
votes
2 answers

MySql - changing innodb_file_per_table for a live db

I have a large MySql DB (150GB) and only now I've noticed that the innodb_file_per_table is set to off which causes the entire DB to be hosted on one single file (ibdata1). I want to activate innodb_file_per_table and have it retroactively split the…
Ran
  • 1,573
  • 9
  • 21
  • 35
19
votes
9 answers

How can I make MySQL client read password from mylogin.cnf?

I'm trying to make the mysql client connect to a mysql server without requiring the password to be given interactively. Steps taken: 1) First create a mylogin.cnf file $ mysql_config_editor set --user= --password --host= Enter…
15
votes
2 answers

MySQL difference between wait_timeout and connect_timeout

I have a my.cnf file. In it I see wait_timeout as well as connect_timeout. What's the difference between these 2?
Goose
  • 319
  • 2
  • 4
  • 12
14
votes
2 answers

Enabling LOAD DATA LOCAL INFILE in mysql

LOAD DATA LOCAL INFILE is not enabled by default. Normally, it should be enabled by placing local-infile=1 in my.cnf. But it does not work for all installations. In my experience, it worked for Debian 7, but not Debian 7 minimal, though both…
Googlebot
  • 4,551
  • 26
  • 70
  • 96
12
votes
2 answers

How to configure global charset on MySQL

I tried to change the charset for our MySQL via my.cnf and it failed. I added the charset settings listed below: # The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock skip-locking key_buffer =…
Ben
  • 225
  • 2
  • 3
  • 13
12
votes
1 answer

MySQL: bind-address 0.0.0.0 in my.cnf does not work?

I'm new to mysql. I want to connect to mysql server using whatever ip I want. I read that all I have to do is to add to my.cnf file the line bind-address = 0.0.0.0. That's what I did. I restarted mysql server and then I tested it from command…
nikos_S
  • 121
  • 1
  • 1
  • 3
10
votes
2 answers

MySQL 5.1 InnoDB Configuration / 24GB RAM - bi-xeon high load

i'm running a facebook app which currently has 300 - 600 concurrent users (and growing). To get the hardware ready for growing i changed my i7 / 12gb ram / 2x 80gb intel x25 ssd's (debian 5.0 / mysql 5.0 / 64bit) into a bi-xeon / 24gb ram / 2x 120gb…
Kilian
  • 201
  • 1
  • 2
  • 3
9
votes
2 answers

How do I make binlog-format=ROW the start up default in the /etc/my.cnf file?

I can run the query SET GLOBAL binlog_format = 'ROW' and it works for that session. How do I make this setting stick after stopping and restarting MySQL? NOTE: I am on version 5.5.19 of MySQL (with Moodle) and I just upgraded from MyISAM to InnoDB…
Constance
  • 91
  • 1
  • 1
  • 3
9
votes
1 answer

Reloading MySQL my.cnf changes

Do you have to restart MySQL to edit changes? Or can you edit them on the fly and restart MySQL or make the changes inside MySQL? This server runs 100s of website that are active and I don't really want to bring mysql down for a restart unless I…
Tiffany Walker
  • 185
  • 2
  • 3
  • 8
6
votes
1 answer

Mysql 5.5 InnoDB growing CPU - Going crazy

Good morning, I'm currently facing a problem where CPU usage keeps going up until the server crash. I've tried multiple best practices proposed in this forum and on Percona, reinstalled the server twice already. Nothing seems to work. The…
user3469247
  • 151
  • 1
  • 5
6
votes
2 answers

What happened to my-*.cnf in MySQL 5.6.8?

Up to MySQL 5.6.7, the official RPM was shipping with these files: /usr/share/mysql/my-innodb-heavy-4G.cnf /usr/share/mysql/my-medium.cnf /usr/share/mysql/my-huge.cnf /usr/share/mysql/my-large.cnf /usr/share/mysql/my-small.cnf In 5.6.8, these files…
BenMorel
  • 734
  • 1
  • 11
  • 36
6
votes
2 answers

How to optimize the my.cnf of a MySQL server that mixes InnoDB and MyISAM tablespaces?

I have a database that, because of some issues, I needed to convert some tables from MyISAM to InnoDB. I basically did this: set sql_log_bin = 0; set sql_mode = 'STRICT_ALL_TABLES'; ALTER TABLE `table1` ENGINE = INNODB; ALTER TABLE `table2`…
user5793
  • 61
  • 1
  • 2
5
votes
2 answers

Creating and editing my.cnf by MySQL Workbench?

I just installed MySQL Server and MySQL Workbench on a clean Snow Leopard MacBook. I hooked up Workbench with the server and was able to start the MySQL Server from within the Workbench. I enter the Administration menue of MySQL Workbench it tells…
Aufwind
  • 377
  • 2
  • 3
  • 8
5
votes
1 answer

Installing and enabling both master and slave semisynchronous plugins on same server

I want to run a semisynchronous replication setup, and for simplicity I'd like to not have to INSTALL and UNINSTALL plugins when a slave is promoted to a master. So I'm wondering if I'll experience any problems having both master and slave plugins…
jberryman
  • 481
  • 1
  • 5
  • 11
1
2 3
9 10