【问题标题】:cakephp is not able to connect to databasecakephp 无法连接到数据库
【发布时间】:2010-09-01 10:06:56
【问题描述】:

我是一个 cakephp 新手,我尝试设置我与 mysql 的连接。我之前有它工作过,但是在我更改了我的 mysql 数据库名称之后,即使我更改了 config 文件夹中 database.php 中的数据库名称,它也不会再连接了。我必须再次运行 cakephp 控制台吗?

Your tmp directory is writable.

The FileEngine is being used for caching. To change the config edit APP/config/core.php

Your database configuration file is present.

Cake is NOT able to connect to the databa

上面是显示的消息。 任何想法我必须做什么?非常感谢!

【问题讨论】:

    标签: php database cakephp


    【解决方案1】:

    确保新数据库允许 database.php 文件中的用户访问新数据库。查看MySQL GRANT 语法。

    【讨论】:

    • 那么我会设置一个使用 mysql_connect 的简单测试脚本,看看它抛出了什么错误,并尝试在您尝试使用/访问的数据库上运行一些简单的查询。
    猜你喜欢
    • 2014-03-06
    • 2011-10-16
    • 1970-01-01
    • 2019-01-07
    • 2023-04-02
    • 2011-06-16
    相关资源
    最近更新 更多