Missing Database Connection

Error: A Database connection using "Mysql" was missing or unable to connect.
The database server returned this error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Notice: If you want to customize this error message, create app/View/Errors/missing_connection.ctp

Stack Trace

  • CORE/Cake/Model/Datasource/DboSource.php line 260Mysql->connect()
  • CORE/Cake/Model/ConnectionManager.php line 105DboSource->__construct(array)
  • CORE/Cake/Model/Model.php line 3476ConnectionManager::getDataSource(string)
  • CORE/Cake/Model/Model.php line 1126Model->setDataSource(string)
  • CORE/Cake/Model/Model.php line 3498Model->setSource(string)
  • CORE/Cake/Model/Model.php line 2902Model->getDataSource()
  • CORE/Cake/Model/Model.php line 2874Model->_readDataSource(string, array)
  • CORE/Cake/Model/Datasource/Session/DatabaseSession.php line 94Model->find(string, array)
  • [internal function]DatabaseSession->read(string)
  • CORE/Cake/Model/Datasource/CakeSession.php line 629session_start()
  • CORE/Cake/Model/Datasource/CakeSession.php line 198CakeSession::_startSession()
  • CORE/Cake/Model/Datasource/CakeSession.php line 375CakeSession::start()
  • CORE/Cake/Controller/Component/SessionComponent.php line 69CakeSession::read(string)
  • ROOT/plugins/DebugKit/Controller/Component/ToolbarComponent.php line 161SessionComponent->read(string)
  • CORE/Cake/Controller/ComponentCollection.php line 116ToolbarComponent->__construct(ComponentCollection, array)
  • CORE/Cake/Controller/ComponentCollection.php line 53ComponentCollection->load(string, array)
  • CORE/Cake/Controller/Controller.php line 643ComponentCollection->init(AppUsersController)
  • CORE/Cake/Routing/Dispatcher.php line 181Controller->constructClasses()
  • CORE/Cake/Routing/Dispatcher.php line 160Dispatcher->_invoke(AppUsersController, CakeRequest, CakeResponse)
  • ROOT/webroot/index.php line 108Dispatcher->dispatch(CakeRequest, CakeResponse)