Server 10.4 - where is mysql .ini file?

Discussion in 'Mac OS X Server' started by bunner bob, Aug 18, 2005.

  1. bunner bob

    bunner bob Registered

    Joined:
    Nov 26, 2003
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    I can't seem to find the mysql .ini file in Tiger server. I believe it's called something like my.ini.

    Any idea what the path is?

    - Bob
     
  2. Emerrill

    Emerrill Registered

    Joined:
    Sep 27, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Houghton, MI
    You need to create /etc/my.cnf

    -eric
     
  3. bunner bob

    bunner bob Registered

    Joined:
    Nov 26, 2003
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    Really - so it doesn't exist from the get-go? I find that hard to believe - there must be quite a few initialization parameters already set up in a config file somewhere.

    I say this after reading this
    http://www.openwin.org/mike/faq/faq...ot-support-authentication-protocol-requested/
    - according to the information on this site, I ned to add a line in the [mysqld] section of my configuration file. Meaning this section (and thus the file) should already exist.
     
  4. Emerrill

    Emerrill Registered

    Joined:
    Sep 27, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Houghton, MI
    I created the file, and the locate (locate .ini, locate .cnf) command indicates the file doesn't exist by default. Here is mine for example:

    [mysqld]
    socket=/tmp/mysql.sock

    #Use old password encryption method (needed for 4.0 and older clients).
    old_passwords
     
  5. bunner bob

    bunner bob Registered

    Joined:
    Nov 26, 2003
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    Hey, that locate command is cool!

    So, does MySql just know to look in /etc/ for a file called my.cfg?
     
  6. Emerrill

    Emerrill Registered

    Joined:
    Sep 27, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Houghton, MI
    Yup. Just edit it and restart mysql

    -eric
     
  7. philaweb

    philaweb Registered

    Joined:
    Sep 5, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Postal Worker
    Location:
    Copenhagen, Denmark, Europe
    I am having the exact same problem.

    But... On top of that I am also having problems editing a "my.cfg" file.

    What should this file contain?

    How do I save it within the /etc/ system folder?

    I have tried to save it with JEdit, which is denied access to that folder.

    Anyone with a solution on how I can get MySQL up and running with some sort of interface so I can import databases?
     
  8. Emerrill

    Emerrill Registered

    Joined:
    Sep 27, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Houghton, MI

    You want phpMyAdmin for the interface. Just download it, unpack it, and put it in /Lib/WebServer/Docs/.

    To edit the ini file, you need to use the terminal, or some gui that can run as root. From the terminal you can use 'sudo pico /etc/my.ini'

    -eric
     
  9. philaweb

    philaweb Registered

    Joined:
    Sep 5, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Postal Worker
    Location:
    Copenhagen, Denmark, Europe
    Yup... Now I've got the interface up and running. :)

    Even though I have to call the interface via HTTP because PHP files are configured to be opened by the text editor.

    Okay... Hmm. :(

    I must add that I'm very new to this Unix concept.

    Even though my imagination doesn't come short in most occasions, cracking your "code" without a tutorial is quite difficult. I found the Terminal editor - and I seem to have problems making the saved "my.cfg" file stick around in the "etc" folder.

    Is a there a step-by-step tutorial somewhere on making the MySQL program work on MacOS X? After all - I have paid far more for this server software than I would ever consider paying for any other software.
     
  10. philaweb

    philaweb Registered

    Joined:
    Sep 5, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Postal Worker
    Location:
    Copenhagen, Denmark, Europe
    Hmm... Seems like I just found what I was looking for with this MacOS server tutorial. :)

    Edit: Okay, so now... Thanks to the above linked tutorial... I understand that the terminal editor works sort of like DOS on a PC.

    There are some errors in the above linked tutorial, but I am now in touch with the MySQL program and trying to configure the socket via the "my.cfg" or "my.ini" file? (Not quite sure since both were mentioned).
     
  11. philaweb

    philaweb Registered

    Joined:
    Sep 5, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Postal Worker
    Location:
    Copenhagen, Denmark, Europe
    Well, no /tmp/mysql.sock file on my Mac, unfortunately.

    Hmm... Perhaps some other file that I'm not aware of?

    Emerrill,

    Many thanks for your taking your time with me. :)
     
  12. philaweb

    philaweb Registered

    Joined:
    Sep 5, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Postal Worker
    Location:
    Copenhagen, Denmark, Europe
    After some Googlin' I've found this post. Seems like MySQL and PHP doesn't communicate well on the MacOS X 10.4.2 browser from default settings.

    I've located the socket file at /var/mysql/mysql.sock - like mentioned in the above linked post. Tried to create a "my.cfg" and "my.ini" file with the following code to no avail:

    [mysqld]
    socket=/var/mysql/mysql.sock

    Does anyone know how to edit the /etc/php.ini.default file?
     
  13. philaweb

    philaweb Registered

    Joined:
    Sep 5, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Postal Worker
    Location:
    Copenhagen, Denmark, Europe
    Well, I temporarily give up for a good nights sleep. :eek:

    Attached is an image of what I think is the problem.

    Emerrill, I have tried your suggestions on creating .cfg and .ini files in the /etc/ folder - absolutely no luck. The image of the MySQL configuration is taken after I added those files you suggested.

    I have also edited the /etc/php.ini file (found out how to via the Terminal program). It only changed some of the configuration, as can be seen on the attached image (/var/mysql/mysql.sock).

    Perhaps the solution is right under my nose, but I am too tired, snowblind to see it. :p

    BTW... The vBulletin board javascript Wysiwyg stuff does NOT work on Firefox. Had to fire up MSIE 6 to get the attachment right. ::ha::
     

    Attached Files:

Share This Page