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
4
votes
0 answers

mysqldump fails if pager set in [client] config section

I have this in my my.cnf: [client] pager = 'less -SRXF' Which helps using mycli. However I've noticed that this causes mysqldump to fail mysqldump: unknown variable 'pager=less -SRXF I've tried adding a [mysqldump] section without pager, or with…
artfulrobot
  • 20,637
  • 11
  • 55
  • 81
4
votes
2 answers

Mysql 5.6.10 configuration

DB server 16 cores 63Gb RAM CentOS release 6.8 etc/my.cnf [mysqld] pid_file=/var/lib/mysql/fatty01.pid datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql innodb_buffer_pool_size = 50G innodb_log_file_size =…
Paulo Almeida
  • 2,159
  • 2
  • 17
  • 19
4
votes
2 answers

Changes to my.cnf don't take effect (Ubuntu 16.04, mysql 5.6)

Changes I make to my.cnf don't seem to have any effect on the mysql environment. Here's a summary of what's happened... I installed mysql 5.7 on Ubuntu 16.04 but then realized I needed to downgrade to mysql 5.6 due to incompatibility issues. I apt…
Ron Collins
  • 93
  • 1
  • 1
  • 7
4
votes
1 answer

Could not set thread-stack size in mysql

I'm trying to increase thread-stack variable. I can do it successfully using command-line option as such: /usr/sbin/mysqld --thread-stack=256k I can also do it using configuration files /etc/init/mysql.conf or…
Sergey Kamardin
  • 1,640
  • 1
  • 18
  • 22
3
votes
2 answers

MySQL remote connection slow even after enabling skip-name-resolve

I have a development environment set up with remote access to a shared dev database. I'm experiencing VERY slow response time from the remote MySQL server. I've added skip-name-resolve to the my.cnf file, restarted mysqld, and also verified that it…
Tyguy7
  • 573
  • 8
  • 15
3
votes
1 answer

Where does the mariadb logs exists

I am using mariadb and I to investigate some issue I wanted to check the logs. To my surprise, log file is not generated for mariadb. I suspect this cannot be the case so I am doubting my search skills. MariaDB [(none)]> show variables like…
Bhupesh Pant
  • 4,053
  • 5
  • 45
  • 70
3
votes
1 answer

MySql : InnoDB_Force_recovery = 1 leads to table in read only

I have an application which runs under MariaDB 10.1.18 and I had problems of data corruption. So, in my.cnf I change the parameter innoDB_force_recovery = 1 to ignore them. But then, I can not make insert in tables. But I thought that insert are…
C Morell
  • 81
  • 1
  • 3
  • 10
3
votes
1 answer

Maria DB configuration on Swisscom cloud

We are going to use next stack: Tomcat 8/Java 8 buildpacked + ELK + S3 + Maria DB. We prepared our package and deployments process is starting ok, but we are stuck on configuring Maria DB. More specifically we need at least next parameters to be set…
Eugene Gy
  • 107
  • 8
3
votes
1 answer

MySql Setting Default Value of 'collation_connection'

I have a MySql 5.6 database where the database is using a collation of utf8_unicode_ci. Every time I create a new table the table is created with utf8_unicode_ci, but the varchar columns are set with utf8_general_ci. When I look at the variables…
Blake
  • 31
  • 1
  • 3
3
votes
2 answers

Add max_allowed_packet to my.cnf in vagrant environment

So I have a box that includes a mysqldump file executed at provision. The problem now is that I need to increase the max_allowed_packet variable before execute this script. How can I do something like: max_allowed_packet = 128M >> /etc/my.cnf but…
Alwin Kesler
  • 1,450
  • 1
  • 20
  • 41
3
votes
2 answers

mysql change default character set latin1 to utf8

I have PHP 5.5.9 and MySQL 5.5.43 Innodb. This is in Kubuntu LTS /etc/mysql/my.cnf printf("Current character set: %s\n", mysqli_character_set_name($conn)); Current character set: latin1 I've tried default-character-set = utf8 first but then my…
user1081168
  • 49
  • 1
  • 6
3
votes
1 answer

Vagrant: open mysql connection to host

I'd like to use MySql Workbench to browse my database in Vagrant from host machine. So far I just commented the line bind-address = 127.0.0.1 in my.cnf and all was ok, but recently I connected to a new wi-fi and things seemed to change, I had to…
K. Weber
  • 2,643
  • 5
  • 45
  • 77
3
votes
3 answers

max_allowed_packet is stuck when using mamp

I've created a my.cnf file and placed it according to this question. I've logged in to mysql as root and SET GLOBAL max_allowed_packet=536870912. I've restarted MAMP. I keep getting this: mysql> show variables like…
beth
  • 1,916
  • 4
  • 23
  • 39
3
votes
2 answers

how to add date to mysql error log

Mysql error logs only have a number next to them and the time they were created, I need to format it so that it also includes the date, how should I do it? 130207 2:25:29 [Note] Plugin 'FEDERATED' is disabled. 130207 2:25:29 InnoDB: The InnoDB…
Serenade
  • 671
  • 1
  • 8
  • 10
3
votes
1 answer

Optimal my.cnf recommendation

I'd like to ask anyone with a bit of experience on an opinion of my current my.cnf settings and what optimizations should be done. Server specs are: CPU: AMD Opteron™ 3280, 8 Cores, 8x 2.4 GHz RAM: 16 GB DDR3 2x 2,000 GB SATA II-HDD, 7.2k - RAID 1…
Alex
  • 31
  • 1
  • 3
1 2
3
15 16