CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • CiviCRM on Mac OSX server
Pages: [1]

Author Topic: CiviCRM on Mac OSX server  (Read 3106 times)

jumpinin

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.0.1
  • CMS version: Drupal 7
  • MySQL version: Ver 14.12 Distrib 5.0.91
  • PHP version: PHP 5.3.4
CiviCRM on Mac OSX server
May 07, 2011, 08:31:34 pm
I'm relatively new to CiviCRM. I've installed it a couple of times on Ubuntu with success but now I'm trying to install it on Mac OSX server. While running the install/index.php I'm getting "Can't find the a MySQL server on 'localhost': No such file or directory". Initially I figured it was the location of the mysqld.sock file which I had to correct in php.ini to /opt/local/var/run/mysql5/mysqld.sock but I can't seem to find any references to that. Drupal is installed and working so I know PHP is working and can connect to the MySQL database. Obviously it appears that CiviCRM is expecting something to be in a standard path and it can't find it so it should be fairly easy to fix it I could located the broken path. Any ideas?

Thanks for any suggestions!

jumpinin

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.0.1
  • CMS version: Drupal 7
  • MySQL version: Ver 14.12 Distrib 5.0.91
  • PHP version: PHP 5.3.4
Re: CiviCRM on Mac OSX server
May 07, 2011, 08:33:36 pm
BTW I'm installing Drupal 7 and CiviCRM 4.0.1. Should I be using Drupal 6 and CiviCRM 3.4?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CiviCRM on Mac OSX server
May 08, 2011, 03:43:43 am
I recommend Drupal 7 and CiviCRM 4. Regarding MySQL, perhaps Drupal installed using mysqli and it has a different default port than mysql. Either way, check your phpinfo() for the exact location and try entering that into the CiviCRM install page instead of just localhost
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

PinkChocobo

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 3.3.6
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.2.13
Re: CiviCRM on Mac OSX server
June 16, 2011, 11:54:39 am
Use 127.0.0.1 instead of localhost to connect to the database

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: CiviCRM on Mac OSX server
November 02, 2012, 09:37:11 pm
Quote from: PinkChocobo on June 16, 2011, 11:54:39 am
Use 127.0.0.1 instead of localhost to connect to the database

Thanks for this tip. I've been setting up a local machine (OSX 10.6) for extension development and I just couldn't figure out why the Drupal installer could find my databases but the civiCRM one could not. As soon as I switched the DB server from localhost to 127.0.0.1 everything fell into place. Awesome!

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

Jens-Erik

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.4
Re: CiviCRM on Mac OSX server
November 03, 2012, 04:51:42 pm
Btw: this issue is no Mac specific problem and doesn’t have anything to do with DNS; it’s the strange MySQL convention that localhost refers to a socket connection and 127.0.0.1 to a TCP connection to MySQL on the same computer. If the MySQL is on another computer it’s a TCP connection no matter if you enter the domain name or IP number.

With the mysql5 (i.e. 5.1) of MacPorts the socket is at /opt/local/var/run/mysql5/mysqld.sock. I tried to get MacPorts MySQL 5.5 running , but gave up after a while. I’m not the only one who got frustrated with the lack of documentation for that. Someone wrote he installed the binaries provided by Oracle. I did the same. Then the socket is at the default location /tmp/mysql. For Apache and PHP I still use MacPorts.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • CiviCRM on Mac OSX server

This forum was archived on 2017-11-26.