I snapped up the CI2/Doctrine2 from Wildly Inaccurate. I am attempting to begin using it, before I am really dealing with use it, I needed to make certain everything works. However, after i try the command line tool, I encounter the next error:
$ ./doctrine orm:schema-tool:create ATTENTION: This operation should not be executed in a production environment. Creating database schema... Warning: PDO::__construct():  Socket operation on non-socket (trying to connect via unix:///var/mysql/mysql.sock) in /Users/joris/Desktop/ci2_starter/application/libraries/Doctrine/DBAL/Driver/PDOConnection.php on line 36 [PDOException] SQLSTATE[HY000]  Socket operation on non-socket orm:schema-tool:create [--dump-sql]
I am running this on the cleanly installed MAMP Professional 2..1 I am not necessarily sure how you can fix this error.. I am not necessarily knowledgeable around the inner (background) workings of MySQL. Could someone obvious this up for me personally? Thanks.
MacBook-Pro-van-Joris-Ooms:~ joris$ sudo find / -name 'mysql.sock' Password: /Applications/MAMP/tmp/mysql/mysql.sock find: /dev/fd/3: Not a directory find: /dev/fd/4: Not a directory /private/var/mysql/mysql.sock /private/var/mysql/mysql.sock/mysql.sock
MAMP does use it's own mysql socket as the CLi uses the default one out of /var/mysql/mysql.sock. This might mean you're running the incorrect PHP version (not the MAMP one however the default MAC OS X one). Not really a large deal because it can cope with your Doctrine Comand Line Issues too. So you have serveral options:
use the MAMP php version to begin the CLi tool by putting the road to your MAC OS X php version like a prefix i.e.
/Application/MAMP/bin/php5.3/bin/php ./doctrine orm:schema-tool:create
just setup a hyperlink from /var/mysql/mysql.sock towards the actual Socket file that ought to maintain /Programs/MAMP//tmp/mysql/mysql.sock So put forth the terminal while your MAMP is running an type (You'll be requested to key in your password):
sudo ln -s /Programs/MAMP//tmp/mysql/mysql.sock /var/mysql/mysql.sock
Find every occurence of "/Programs/MAMP//tmp/mysql/mysql.sock" in all of your MAMP config files and alter so that it is /var/mysql/mysql.sock which means you really use the default adress for MySQL Socket. Though, i have not examined if the works.