错误:数据库连接" Mysql"缺失或无法创建。
0 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Model/ConnectionManager.php(105): DboSource->__construct(Array)
1 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/Command/Task/ModelTask.php(952): ConnectionManager::getDataSource('default')
2 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/Command/Task/ModelTask.php(889): ModelTask->getAllTables(NULL)
3 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/Command/Task/ModelTask.php(979): ModelTask->listAll(NULL)
4 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/Command/Task/ModelTask.php(203): ModelTask->getName()
5 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/Command/Task/ModelTask.php(91): ModelTask->_interactive()
6 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/Command/BakeShell.php(109): ModelTask->execute()
7 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/Shell.php(461): BakeShell->main()
8 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/ShellDispatcher.php(212): Shell->runCommand(NULL, Array)
9 /opt/lampp/htdocs/projects/cakephp/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
10 /opt/lampp/htdocs/projects/cakephp/app/Console/cake.php(47): ShellDispatcher::run(Array)
11 {main}
我的数据库看起来像:
<?php
class DATABASE_CONFIG {
public $default = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => '127.0.0.1', 'login' => 'root', 'password' => '', 'database' => 'cake', );
}
?>