Is there a MySQL command to locate the my.cnf
configuration file, similar to how PHP's phpinfo()
locates its php.ini
?
相关问题
- Is shmid returned by shmget() unique across proces
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- how to get running process information in java?
- MySQL: conduct a basic search
If you're on a Mac with Homebrew, use
You'll see something like
That last line is the
INSTALLERDIR
per the MySQL docsYou will have to look through the various locations depending on your version of MySQL.
You could always run find in a terminal.
By default, mysql search my.cnf first at /etc folder. If there is no /etc/my.cnf file inside this folder, I advise you to create new one in this folder as indicated by the documentation (https://dev.mysql.com/doc/refman/5.6/en/option-files.html).
You can also search for existing my.cnf furnished by your mysql installation. You can launch the following command
You can use the following configuration file with myisam table and without innodb mysql support (from port installation of mysql on mac os x maverick). Please verify each command in this configuration file.
Try running
mysqld --help --verbose | grep my.cnf | tr " " "\n"
Output will be something like
If you are using MAMP, access Templates > MySQL (my.cnf) > [version]
If you are running MAMP windowless you may need to customize the toolbar using the Customize button.