之前稳定运行的数据库,突然报CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No such file or directory
额,查了半天,有个老外说:
127.0.0.1 may work for you because windows may assume to use localhost as ::1 for IPv6 (depending on the version of windows we are talking about) and entering the IP of localhost (127.0.0.1) will force it to use IPv4
然后把localhost改成127.0.01就好了,估计是阿里云服务器做了升级,没搞懂原因