cakephp - Database connection "Mysql" is missing, or could not be created -


i'm developing cakephp based application, on wamp.

for reason cannot run cake bake anymore.

after run command:

c:\program files\wamp\www\my-application>"c:\program files\wamp\www\cakephp-246 0\app\console\cake.bat" bake

... i'm getting following error:

welcome cakephp v2.4.6 console --------------------------------------------------------------- app : my-application path: c:\program files\wamp\www\my-application\ --------------------------------------------------------------- --------------------------------------------------------------- bake model path: c:\program files\wamp\www\my-application\model\ --------------------------------------------------------------- error: database connection "mysql" missing, or not created. #0 c:\program files\wamp\www\cakephp-2460\lib\cake\model\connectionmanager.php(1 05): dbosource->__construct(array) #1 c:\program files\wamp\www\cakephp-2460\lib\cake\console\command\task\modeltas k.php(927): connectionmanager::getdatasource('default') #2 c:\program files\wamp\www\cakephp-2460\lib\cake\console\command\task\modeltas k.php(864): modeltask->getalltables(null) #3 c:\program files\wamp\www\cakephp-2460\lib\cake\console\command\task\modeltas k.php(954): modeltask->listall(null) #4 c:\program files\wamp\www\cakephp-2460\lib\cake\console\command\task\modeltas k.php(203): modeltask->getname() #5 c:\program files\wamp\www\cakephp-2460\lib\cake\console\command\task\modeltas k.php(91): modeltask->_interactive() #6 c:\program files\wamp\www\cakephp-2460\lib\cake\console\shell.php(437): model task->execute() #7 c:\program files\wamp\www\cakephp-2460\lib\cake\console\shell.php(434): shell ->runcommand('execute', array) #8 c:\program files\wamp\www\cakephp-2460\lib\cake\console\shelldispatcher.php(2 07): shell->runcommand('model', array) #9 c:\program files\wamp\www\cakephp-2460\lib\cake\console\shelldispatcher.php(6 6): shelldispatcher->dispatch() #10 c:\program files\wamp\www\cakephp-2460\app\console\cake.php(36): shelldispat cher::run(array) #11 {main}  c:\program files\wamp\www\my-application> 

it worked before. think problem started after php upgraded.

i followed lot's of instructions like:

cakephp bake shell error: database connection “mysql” missing, or not created

cakephp database connection "mysql" missing, or not created

cakephp bake error: database connection "mysql" missing, or not created

... etc, did not solved problem.

i have mention cakephp application works, , problem have cannot run of cake bake options.

you need add path mysql socket file

in app/config/database.php add unix_socket parameter

'unix_socket' => '/path/to/sql/socket'


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -