好的,所以我正在尝试连接到我的远程 SQL 数据库。
我正在使用以下设置:
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '10.246.16.153:3306',
'login' => '*******',
'password' => '*******',
'database' => 'udlejnings_pris',
'prefix' => '',
//'encoding' => 'utf8',
);
我的数据库设置如下:
Database server
Server: 10.246.16.153 via TCP/IP
Software: MySQL
Software version: 5.1.66-0+squeeze1 - (Debian)
Protocol version: 10
Server charset: UTF-8 Unicode (utf8)
现在,当我尝试访问此服务器时,出现以下错误:
2013-10-12 16:27:28 Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
'class' => 'Mysql',
'message' => 'SQLSTATE[HY000] [2002]
',
'enabled' => true,
)
那我做错了什么?