Slim Application Error

The application could not run because of the following error:

Details

Code: 2
Message: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
File: /home/oto/public_html/oto3/deployment/api/V2.5/Classes/Lib/lib_oto_widgets_purchase.php
Line: 17

Trace

#0 [internal function]: Slim::handleErrors('SELECT id_adv F...')
#1 /home/oto/public_html/oto3/deployment/api/V2.5/Classes/Lib/lib_oto_widgets_purchase.php(17): mysql_query('db7828797eca9b2...', 'localhost')
#2 /home/oto/public_html/oto3/deployment/api/V2.5/Classes/Authenticator.php(31): OtoWidgetsPurchaseManager->check('db7828797eca9b2...')
#3 /home/oto/public_html/oto3/deployment/api/V2.5/docker.php(7): Authenticator::getCredentials('db7828797eca9b2...', 'puppeteer-prere...')
#4 [internal function]: getDockerService('getDockerServic...', Array)
#5 /home/oto/public_html/oto3/deployment/api/V2.5/Slim/Router.php(187): call_user_func_array(Object(Slim_Route))
#6 /home/oto/public_html/oto3/deployment/api/V2.5/Slim/Slim.php(1146): Slim_Router->dispatch()
#7 /home/oto/public_html/oto3/deployment/api/V2.5/Slim/Middleware/Flash.php(84): Slim->call()
#8 /home/oto/public_html/oto3/deployment/api/V2.5/Slim/Middleware/MethodOverride.php(91): Slim_Middleware_Flash->call()
#9 /home/oto/public_html/oto3/deployment/api/V2.5/Slim/Middleware/PrettyExceptions.php(65): Slim_Middleware_MethodOverride->call()
#10 /home/oto/public_html/oto3/deployment/api/V2.5/Slim/Slim.php(1094): Slim_Middleware_PrettyExceptions->call()
#11 /home/oto/public_html/oto3/deployment/api/V2.5/index.php(226): Slim->run()
#12 {main}