:(

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

错误位置

FILE: /var/www/html/zcfair.com/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 105

TRACE

#0 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Db/Driver.class.php(105): E('SQLSTATE[HY000]...')
#1 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Db/Driver.class.php(1037): Think\Db\Driver->connect()
#2 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Db/Driver/Mysql.class.php(50): Think\Db\Driver->initConnect(true)
#3 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Model.class.php(132): Think\Db\Driver\Mysql->getFields('onethink_config')
#4 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Model.class.php(120): Think\Model->flush()
#5 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Model.class.php(1431): Think\Model->_checkTableInfo()
#6 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Model.class.php(95): Think\Model->db(0, '', true)
#7 /var/www/html/zcfair.com/ThinkPHP/Common/functions.php(564): Think\Model->__construct('Config', '', '')
#8 /var/www/html/zcfair.com/Application/Common/Api/ConfigApi.class.php(20): M('Config')
#9 [internal function]: Common\Api\ConfigApi::lists()
#10 /var/www/html/zcfair.com/Application/Common/Common/function.php(875): call_user_func_array('Common\Api\Conf...', Array)
#11 /var/www/html/zcfair.com/Application/Home/Controller/HomeController.class.php(27): api('Config/lists')
#12 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Controller.class.php(41): Home\Controller\HomeController->_initialize()
#13 /var/www/html/zcfair.com/ThinkPHP/Common/functions.php(624): Think\Controller->__construct()
#14 /var/www/html/zcfair.com/ThinkPHP/Library/Think/App.class.php(81): controller('Article', '')
#15 /var/www/html/zcfair.com/ThinkPHP/Library/Think/App.class.php(194): Think\App::exec()
#16 /var/www/html/zcfair.com/ThinkPHP/Library/Think/Think.class.php(120): Think\App::run()
#17 /var/www/html/zcfair.com/ThinkPHP/ThinkPHP.php(97): Think\Think::start()
#18 /var/www/html/zcfair.com/index.php(39): require('/var/www/html/z...')
#19 {main}