Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2009
    Posts
    3
    Plugin Contributions
    0

    Default how do change the mysql socket?

    I'm usin ZC 1.3.8 and mysql 5.0.67. ZC wants to access it using

    'MYSQL_UNIX_ADDR =/var/mysql/mysql.sock which is set in a c header file

    mysql uses MYSQL_UNIX_ADDR = "/tmp/mysql.sock"

    how do I configure php or ZC to use the correct file?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: how do change the mysql socket?

    Zen Cart doesn't explicity specify a socket to use for MySQL communications.
    Instead, it relies on the PHP configuration (usually php.ini controlled by the server administrator) to handle that.

    Assuming you've got PHP and MySQL and Apache installed and running properly on your Mac, then you would simply begin the Zen Cart install and specify the database name/user/password credentials when prompted. Zen Cart will use the Apache/PHP/MySQL configuration settings to do the database table setup etc.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: how do change the mysql socket?

    yes, my issue is php relies on a c header file that is not editable without a compiling. Its permissions are read only. I can change the permissions and file, but I'm not a c programmer and am concerned that may hurt my php install

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: how do change the mysql socket?

    Since you posted in the section about Installing on a Mac, I suppose you'll need to contact Apple's Developer Network for instructions on reprogramming your operating system or recompiling. Did you ever suppose that perhaps the file is read-only for a very important reason? Sure seems like it to me.

    Either that or find yourself a simpler way to install/configure your Apache/PHP/MySql support.

    Personally I think you're making things WAY TOO complicated. Yours is the first I've heard of anyone having to do any editing to C header files.
    You have several options:

    a) continue on the path you're on ... which is entirely illogical in my opinion
    b) surf the search engines for the proper way to configure Apple's built-in services and adding/configuring PHP/MySQL support.
    c) install a prepackaged Apache/PHP/MySQL stack for the Mac, such as MAMP or XAMPP
    d) skip installing on your Mac, and just install to a real webserver ... since that's where you're going to run your site anyway ... Using a live server is far more straightforward for people unfamiliar with configuring their own computer (Mac or PC) to pretend to be a webserver.

    I recommend you try option (d). And, if that's not suitable for some reason, try (c).

    If you choose (a), then this forum is not for you until you've got your Mac/programming/webserver/etc issues sorted out. After that, come back once you're able to use the webserver and start using Zen Cart.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: how do change the mysql socket?

    Although DrByte is "da man" when it comes to serving up Zen Cart, it's at least possible that the OP was actually trying to use a Mac as a "real webserver". Mac OS X comes in two flavours, one for the usual personal computer uses and one -- called conveniently enough, Mac OS X Server -- for use as a server. It is a highly capable server -- in effect a BSD Unix box -- that has all the usual capabilities of such machines.

    The OP didn't say what he was using and may even have posted in the wrong forum, but assuming he is using a Mac, and even assuming he's using Mac OS X Server, his question remains worrisome. I have to go with the good Doctor's advise, which I'll paraphrase as... If you have to ask that question, you probably shouldn't be doing what you're doing.

    Rob

  6. #6
    Join Date
    Mar 2009
    Posts
    3
    Plugin Contributions
    0

    Default Re: how do I change the mysql socket? - Resolved

    changed in /etc/php.ini, in the section [MySQL] from:

    mysql.default_socket = /var/mysql/mysql.sock

    to

    mysql.default_socket = /mysql/mysql.sock

    then restarted apache

    Thanks for the advice and responses. While I'm new to both Zencart and php, I'm not new to web computing (java and ruby) nor bsd unix so configuring mybox correctly was the best solution for me, now all my php work will access mysql correctle as my ruby does.
    Last edited by rptodd1; 3 Mar 2009 at 02:52 PM.

 

 

Similar Threads

  1. Replies: 30
    Last Post: 15 Apr 2016, 10:36 PM
  2. Replies: 4
    Last Post: 13 Dec 2014, 04:48 AM
  3. Replies: 1
    Last Post: 10 May 2010, 05:29 PM
  4. Replies: 1
    Last Post: 10 Mar 2009, 07:48 PM
  5. Database Backup Manager - MySQL - "cannot connect through socket" message
    By craiglove in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 17 May 2007, 11:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR