0

我在 login_check 操作中收到以下错误:

[2012-09-25 11:51:19] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] [] 
[2012-09-25 11:51:19] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\RouterListener::onEarlyKernelRequest". [] [] 
[2012-09-25 11:51:19] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] [] 
[2012-09-25 11:51:19] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] [] 
[2012-09-25 11:51:19] security.INFO: Authentication request failed: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13) [] [] 
[2012-09-25 11:51:19] security.DEBUG: Redirecting to /user/login [] [] 
[2012-09-25 11:51:19] event.DEBUG: Listener "Symfony\Component\Security\Http\Firewall::onKernelRequest" stopped propagation of the event "kernel.request". [] []

这很奇怪,因为我已经在 /tmp/mysql.sock 和 /run/mysqld/mysqld.sock 之间创建了符号链接,并且我能够创建数据库、模式、加载装置等......

到底是怎么回事?谢谢

4

1 回答 1

0

像往常一样,stackoverflow 似乎是灵感的来源,我设法解决了这个问题。我需要以 root 而不是用户身份创建符号链接。这样做

sudo rm /tmp/mysql.sock
sudo ln -s /run/mysqld/mysqld.sock /tmp/mysql.sock

成功了。

作为旁注:¿我如何在没有超级用户的情况下在 /tmp 上创建符号链接?

¿ 它不应该阻止我这样做吗?

于 2012-09-25T15:00:27.727 回答