You get a bonus - 1 coin for daily activity. Now you have 1 coin

MySQL: where is the my.cnf file located on Debian (Ubuntu), CentOS (RedHat), and FreeBSD

Practice



Lost the my.cnf file (MySQL server configuration) on your new operating system? Here's a quick note on where to look for it depending on the OS:


Debian (and its clone ubuntu): /etc/mysql/my.cnf

CentOS (or RedHat): /etc/my.cnf

FreeBSD: nope, it's not there by default :) just isn't.


To get this file on FreeBSD: go to the /usr/local/share/mysql/ folder and copy whichever one you like to /usr/local/usr/my.cnf:

$ cd /usr/local/share/mysql/
$ sudo cp my-huge.cnf /usr/local/etc/my.cnf


In this example we took the my-huge.cnf file to copy, but you can take any file you like that suits your customization of the settings.

Applies to: MySQL 5.x; Debian/ubuntu, CentOS/RedHat, FreeBSD

created: 2017-05-09
updated: 2026-03-10
4117



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

Артем 22-03-2020
Спасибо все понятно

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Databases - MySql (Maria DB)"

Terms: Databases - MySql (Maria DB)