We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23611
    • 2 Posts
    I’m trying to do a clean install of beta 5 on OS X and the installer keeps failing at the create/test your database step with "Checking database:Could not connect to the mysql server." (see screen shot)

    Server Config:
    OSX 10.5.8 (x86_64)
    Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.7l DAV/2 PHP/5.3.0 (64 bit)
    MySQL client version: mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $
    MySQL server version: 5.1.36 (64 bit)
    PDO - yes
    memory_limit: 128MB
    magic quotes off
    php is the Entropy.ch 5.3.0-3 package - not the one apple ships

    I’ve tried creating the db manually and using different mysql users (all privileges, all privileges on manually created db, & root) to no avail. This server currently has several versions of modx installed and working (0.9.x, 1.x, 2.0-b4).
      • 22303 MODX Staff
      • 10,725 Posts
      Sounds to me like this is an issue with mysqlnd and finding the MySQL socket file. Were all the others installed on this server using this exact configuration or was this updated recently?

      I have no experience with the mysqlnd driver TBH, and do not recommend it yet. It does create some known compatibility issues for those upgrading to PHP 5.3 and choosing this new driver option.
        • 1778
        • 659 Posts
        Hello

        I had a similar issue on a Linux/debian with MySQL 5.1.36 and mysqlInd as client version.

        It’s a problem of socket, I resolved it just in specifying the ’pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock’ (not sure it’s the same on OSX) in my php.ini and all is fine now... Install runs normally, all is working like a charm.

        Hope this helps !
        cheers
          • 25806
          • 1 Posts
          I had the same problem installing on a Mac with MAMP. I added the following line to the MAMP php.ini file:

          pdo_mysql.default_socket=/Applications/MAMP/tmp/mysql/mysqld.sock


          Just in case anyone is not sure, the php.ini file in MAMP is here: /Applications/MAMP/conf/php5/php.ini


          Cheers,

          Rob
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: OpenGeek at Feb 01, 2010, 02:29 PM

            Sounds to me like this is an issue with mysqlnd and finding the MySQL socket file. Were all the others installed on this server using this exact configuration or was this updated recently?

            I have no experience with the mysqlnd driver TBH, and do not recommend it yet. It does create some known compatibility issues for those upgrading to PHP 5.3 and choosing this new driver option.
            FYI, I now have PHP 5.3.1 with mysqlnd running against mysql server 5.0.83 on OS X (I use macports) and all is working fine with the latest dev branch of Revo ( http://svn.modxcms.com/svn/tattoo/tattoo/branches/2.0), though I did have to specify the socket file location in php.ini for all the various mysql extensions to get it working.
              • 23611
              • 2 Posts
              Setting the default socket in php.ini fixed the problem.

              For the mysql package version on OS X this is what worked:
              pdo_mysql.default_socket=/tmp/mysql.sock


              Thanks everyone!
              -Philip
                • 26845
                • 1 Posts
                On my local test machine, I’m running Ubuntu 9.04 with XAMPP 1.7.3a (the latest version) and I’ve done a system-wide search for this mysql.sock file and it doesn’t exist on my machine. I’m obviously missing something. Can someone tell me what I’m doing wrong? I’m anxious to see if this php.ini fix will work. smiley Thanks.
                  • 29055
                  • 7 Posts
                  How can I change that on shared server, without having access to php.ini?
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: sxc at Mar 02, 2010, 04:44 AM

                    How can I change that on shared server, without having access to php.ini?
                    Contact your provider’s support desk and ask them to fix it.