简体   繁体   English

Phalcon开发人员工具模型创建无效

[英]Phalcon Developer Tools Model creation doesn't work

I'm using a MAMP stack with Phalcon and trying to use the Developer Tools. 我正在将MAMP堆栈与Phalcon配合使用,并尝试使用开发人员工具。 However if I try to create a model I get the following error: 但是,如果尝试创建模型,则会出现以下错误:

ERROR: SQLSTATE[HY000] [2002] No such file or directory

I checked the installation itself, the sql settings of the project and the socket values (mysql, mysqli, pdo_mysql). 我检查了安装本身,项目的sql设置和套接字值(mysql,mysqli,pdo_mysql)。 I have no further clue about how to fix this. 我没有进一步解决此问题的线索。

It seems that you have problem with connection to your DB. 似乎您与数据库的连接有问题。 Check this answer - it suggests to use DB IP instead of hostname. 检查此答案 -建议使用DB IP代替主机名。

Check if you can login to your database using console's command: mysql -u USERNAME -p . 检查是否可以使用控制台命令mysql -u USERNAME -p登录到数据库。 Add parameter -p only when you are using password for your user. 仅在为用户使用密码时添加参数-p Use credentials stored in your Phalcon config (assuming that you actually have one, if not - create it). 使用存储在Phalcon配置中的凭据(假设您实际上有一个凭据,如果没有,请创建它)。 More details If it doesn't work - solving this problem should solve model creating issue. 更多详细信息如果它不起作用-解决此问题应解决模型创建问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM