EduSoho网络教学软件 加入小组

537个成员 301个话题 创建时间:2013-09-17

MAC系统 安装后的错误

发表于 2013-11-15 4648 次查看

Error! SQLSTATE[HY000] [2002] No such file or directory
如何解决?
 

4回复
  • 2楼 kent 2013-11-15

    错误在哪里出现? 能否把 app/logs/下的日志贴出来。

     

     

  • 3楼 aqiang 2013-11-15


    [2013-11-15 15:56:52] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php line 762 {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 15:56:52] request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[HY000] [2002] No such file or directory) {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 15:57:04] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php line 762 {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 15:57:04] request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[HY000] [2002] No such file or directory) {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 15:57:10] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php line 762 {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 15:57:10] request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[HY000] [2002] No such file or directory) {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 15:59:29] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php line 762 {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 15:59:29] request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[HY000] [2002] No such file or directory) {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 16:02:22] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php line 762 {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 16:02:23] request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[HY000] [2002] No such file or directory) {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 16:03:21] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php line 762 {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 16:03:21] request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[HY000] [2002] No such file or directory) {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 16:15:41] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php line 762 {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []
    [2013-11-15 16:15:41] request.CRITICAL: Exception thrown when handling an exception (PDOException: SQLSTATE[HY000] [2002] No such file or directory) {"exception":"[object] (PDOException: SQLSTATE[HY000] [2002] No such file or directory at /Applications/AMPPS/www/edusoho/app/cache/prod/appProdProjectContainer.php:762)"} []

  • 4楼 kent 2013-11-15

    原因是: 

      链接数据库的 socket找不到。  

    1、mysql启动会创建一个mysql.sock,这个文件会有一个路径

    2、但是php却去另外一个路径找mysql.sock。  

     

    解决方法:

    1、给php.ini设置mysql.sock的路径

    2、或者 php.ini指向的mysql.sock文件,你将他做个软链接指向mysql的mysql.sock

  • 5楼 kent 2013-11-15

    具体参考:http://forum.symfony-project.org/viewtopic.php?f=21&t=29653

发表回复
功能维护升级中,维护完成完后将再次开放,非常抱歉给您学习造成的不便。