Saturday, December 31, 2011

Re: Cake is NOT able to connect to the database.

I tried this as well, created database as you mentioned below with
testuser, change the configure file as below. But the result is same
as below, still can't connect to DB.
<?php
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'testuser',
'password' => '123456',
'database' => 'cake_testing',
'prefix' => '',
'encoding' => ''
);
}

On 1月1日, 上午1时49分, Sam Sherlock <sam.sherl...@gmail.com> wrote:
> because this is blank
>
> 'database' => '',
>
> what is the name of the mysql database your connecting to?
>
> mysql -u testuser -p123456 -h localhost
> mysql>CREATE DATABASE cake_testing;
> mysql>exit;
>
> then use 'database' => 'cake_testing',

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: