相关疑难解决方法(0)

CakePHP SQLSTATE [HY000] [14]错误

我正在尝试将当前的CakePHP 2.x应用程序升级到3.x.

我修复了命名空间和文件夹结构问题 现在我有数据库问题.在我的测试服务器中,我创建了相同的MySQL数据库并授予用户访问权限.然后我更改了config\app.php配置文件.但是当我尝试我的应用程序时,我得到以下错误.会出现什么问题?似乎Cakephp尝试使用Sqlite,但我使用MySQL?

config\app.php

'Datasources' => [
    'default' => [
        'className' => 'Cake\Database\Connection',
        'driver' => 'Cake\Database\Driver\Mysql',
        'persistent' => false,
        'host' => 'localhost',
        /**
         * CakePHP will use the default DB port based on the driver selected
         * MySQL on MAMP uses port 8889, MAMP users will want to uncomment
         * the following line and set the port accordingly
         */
        //'port' => 'nonstandard_port_number',
        'username' => 'myuser',
        'password' => 'mypass',
        'database' => 'mydatabase',
        'encoding' => 'utf8',
        'timezone' => …
Run Code Online (Sandbox Code Playgroud)

php database cakephp cakephp-3.0

6
推荐指数
1
解决办法
5734
查看次数

标签 统计

cakephp ×1

cakephp-3.0 ×1

database ×1

php ×1