0

I installed MySQL a week back and have been trying to optimize it for the past 24 hours. However, I have never been able to find a configuration file for it. Many users on here have suggested a number of paths to look, and the paths that MySQL looks, but even in all of those, I can't find one. So does MySQL require a configuration file? Because if not, then I'm going to create one, but I don't want to create a second one if there's already one.

I'm assuming MySQL doesn't require a config file, but rather has default values where if a configuration file isn't supplied, it uses the default settings.

Does anyone know if MySQL requires a config file?

User
  • 23,729
  • 38
  • 124
  • 207
  • Try this: http://stackoverflow.com/questions/580331/mysql-how-to-determine-which-config-file-is-being-used Are you using Linux/Windows/Mac etc.? – dwjv Jan 10 '14 at 16:17
  • Thanks, I've tried those already. strace gives command not found, which mysqld returns: /usr/bin/which: no mysqld in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) – User Jan 10 '14 at 16:21
  • What OS are you using? – dwjv Jan 10 '14 at 16:22

2 Answers2

0

Ok, this is easy to figure out. I believe MySQL will run without a config file. Create this file: /etc/my.cnf. It should have a [mysqld] at the top, like this:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
....

Put something in there so that you know it's using it.

dwjv
  • 1,227
  • 9
  • 15
0

You do not need a config file in the first place, everything can be edited. See http://dev.mysql.com/doc/refman/5.5/en/using-system-variables.html

AdrianBR
  • 2,762
  • 1
  • 15
  • 29