{"id":154,"date":"2012-06-21T13:54:56","date_gmt":"2012-06-21T12:54:56","guid":{"rendered":"http:\/\/blog.espol.edu.ec\/xallam\/?p=154"},"modified":"2012-06-21T13:54:56","modified_gmt":"2012-06-21T12:54:56","slug":"symfony-and-mac","status":"publish","type":"post","link":"https:\/\/blog.espol.edu.ec\/xallam\/2012\/06\/21\/symfony-and-mac\/","title":{"rendered":"Symfony and Mac"},"content":{"rendered":"<p>After getting this beautiful error:<\/p>\n<p>Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:\/\/\/var\/mysql\/mysql.sock) in \/some\/path\/here\/symfony\/lib\/plugins\/sfDoctrinePlugin\/lib\/vendor\/doctrine\/Doctrine\/Connection.php on line 470<\/p>\n<p style=\"text-align: center\">PDO Connection Error: SQLSTATE[HY000] [2002] No such file or directory<\/p>\n<p style=\"text-align: center\">\n<p style=\"text-align: left\">Some solutions says that first you need to find the php.ini (that's like looking for the Holy Grail or something similar!). So, the best way is to \"join to your enemies\" by creating a link to the current folder where the mysql.sock is created through:<\/p>\n<pre><code>cd \/var;\u00a0\r\n<\/code>sudo ln -s \/Applications\/MAMP\/tmp\/mysql mysql<\/pre>\n<pre>(Taken from <a href=\"http:\/\/stackoverflow.com\/questions\/3842541\/no-database-connection-via-doctrine-in-symfony\">Stackoverflow<\/a>)<\/pre>\n<p style=\"text-align: left\">Particularly, I used MAMP.<\/p>\n<pre><span style=\"font-family: monospace\">\r\n<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>After getting this beautiful error: Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:\/\/\/var\/mysql\/mysql.sock) in \/some\/path\/here\/symfony\/lib\/plugins\/sfDoctrinePlugin\/lib\/vendor\/doctrine\/Doctrine\/Connection.php on line 470 PDO Connection Error: SQLSTATE[HY000] [2002] No such file or directory Some solutions says that first you need &hellip; <a href=\"https:\/\/blog.espol.edu.ec\/xallam\/2012\/06\/21\/symfony-and-mac\/\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6875],"tags":[1004,146852],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-symfony","tag-mac","tag-symfony-2"],"_links":{"self":[{"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":1,"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":155,"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/posts\/154\/revisions\/155"}],"wp:attachment":[{"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espol.edu.ec\/xallam\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}