How do I restart mysql and where is my.cnf file

Posted by dorelal on Stack Overflow See other posts from Stack Overflow or by dorelal
Published on 2010-04-30T10:37:23Z Indexed on 2010/04/30 12:27 UTC
Read the original article Hit count: 239

Filed under:

I am using snow leopard mac.

I installed mysql on my machine using instructions mentioned here. Everything works great. However I have two questions.

1) Where is my.cnf file? I searched the whole file system and result is empty. Is it possible that there is no my.cnf and mysql works with default values. If yes then probably I should create my.inf at /etc/mysql. Is that right?

2) How do I restar server. I know it gets started when I restart my machine. Here is what plist looks like. mysqld_safe does not let me restart server.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>com.mysql.mysqld</string>
    <key>Program</key>
    <string>/usr/local/mysql/bin/mysqld_safe</string>
    <key>RunAtLoad</key>
    <true/>
    <key>UserName</key>
    <string>mysql</string>
    <key>WorkingDirectory</key>
    <string>/usr/local/mysql</string>
</dict>
</plist>

© Stack Overflow or respective owner

Related posts about mysql