TIMEX
TIMEX

Reputation: 271744

why can't I find my.cnf?

I did updatedb. I did locate my.cnf

But I cannot find it? Nothing.

(I installed MYSQL using aptitude install mysql-server, and mysql does work right now.)

Upvotes: 16

Views: 59051

Answers (4)

Lijo
Lijo

Reputation: 6778

create a configuration file MySQL provides several configuration methods but, in general, it is easiest to to create a my.ini file in the mysql folder. There are hundreds of options to tweak MySQL to your exact requirements, but the simplest my.ini file is:

[mysqld]
# installation directory
basedir="C:/mysql/"

# data directory
datadir="D:/MySQLdata/"

Upvotes: 0

Peter Cordes
Peter Cordes

Reputation: 364169

locate will only print files in directories that you can read.

Also, when you say you did updatedb, did you run

sudo /etc/cron.daily/slocate

If not, then probably what you did run wasn't equivalent. (The default locate program on Debian/Ubuntu these days is mlocate).

Upvotes: 0

psihodelia
psihodelia

Reputation: 30492

You can try following command:

find /etc -name *.cnf

it will show you all locations of *.cnf files

Upvotes: 8

Sam Alba
Sam Alba

Reputation: 871

What is your operating system ? On Debian Linux, it is located on /etc/mysql/my.cnf. If your cannot find it, you can create one from scratch using this documentation.

Upvotes: 26

Related Questions