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

错误位置

FILE: ./lqper/class/db/mysql.class.php  LINE: 55

TRACE

#0 ./lqper/class/db/mysql.class.php(55):PDO->__construct('mysql:dbname=yst2;host=localhost;charset=utf8', 'root', 'pwmysql', 'Array')
#1 ./lqper/class/db/mysql.class.php(85):mysql->connect('')
#2 ./lqper/class/db/mysql.class.php(140):mysql->query('SELECT `data` FROM `yst2`.`lqp_session` WHERE `sessionid` = 'tb93cgskn8a9abcjii2l0psos1' LIMIT 1', 'fetch')
#3 ./lqper/class/model.class.php(91):mysql->get_one('data', 'lqp_session', ' `sessionid` = 'tb93cgskn8a9abcjii2l0psos1'', '', '')
#4 ./lqper/class/session/session_mysql.class.php(52):model->get_one('Array', 'data')
#5 ():session_mysql->read('tb93cgskn8a9abcjii2l0psos1')
#6 ./lqper/class/session/session_mysql.class.php(25):session_start('')
#7 ./lqper/framework.php(214):session_mysql->__construct('')
#8 ./lqper/framework.php(280):Core::_load_class('session_mysql', './lqper/class/session')
#9 ./app/member/class/member.class.php(2):Core::session_start('')
#10 ./lqper/framework.php(212):include('./app/member/class/member.class.php')
#11 ./lqper/framework.php(118):Core::_load_class('member', './app/member/class', '0', '1')
#12 ./app/site/class/site.class.php(3):Core::load_module_class('member', 'member', '0')
#13 ./lqper/framework.php(212):include('./app/site/class/site.class.php')
#14 ./lqper/framework.php(118):Core::_load_class('site', './app/site/class', '0', '1')
#15 ./app/site/index.php(2):Core::load_module_class('site', 'site', '0')
#16 ./lqper/function/global.func.php(794):require('./app/site/index.php')
#17 ./lqper/class/app.class.php(22):require_cache('./app/site/index.php')
#18 ./lqper/class/app.class.php(9):App->exec('')
#19 ./lqper/framework.php(214):App->__construct('')
#20 ./lqper/framework.php(140):Core::_load_class('app', '', '1')
#21 ./lqper/framework.php(106):Core::load_core_class('app')
#22 ./public/index.php(4):Core::run('')

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' in /home/www/yst2/lqper/class/db/mysql.class.php:55 Stack trace: #0 /home/www/yst2/lqper/class/db/mysql.class.php(55): PDO->__construct('mysql:dbname=ys...', 'root', 'pwmysql', Array) #1 /home/www/yst2/lqper/class/db/mysql.class.php(85): mysql->connect() #2 /home/www/yst2/lqper/class/db/mysql.class.php(140): mysql->query('SELECT COUNT(*)...', 'fetch') #3 /home/www/yst2/lqper/class/model.class.php(91): mysql->get_one('COUNT(*) AS num', 'lqp_session', ' `sessionid` = ...', '', '') #4 /home/www/yst2/lqper/class/model.class.php(187): model->get_one(Array, 'COUNT(*) AS num') #5 /home/www/yst2/lqper/class/session/session_mysql.class.php(74): model->count(Array) #6 [internal function]: session_mysql->write('tb93cgskn8a9abc...', '') #7 {main} thrown in /home/www/yst2/lqper/class/db/mysql.class.php on line 55

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' in /home/www/yst2/lqper/class/db/mysql.class.php:55 Stack trace: #0 /home/www/yst2/lqper/class/db/mysql.class.php(55): PDO->__construct('mysql:dbname=ys...', 'root', 'pwmysql', Array) #1 /home/www/yst2/lqper/class/db/mysql.class.php(67): mysql->connect() #2 /home/www/yst2/lqper/class/db/mysql.class.php(226): mysql->execute('DELETE FROM `ys...') #3 /home/www/yst2/lqper/class/model.class.php(159): mysql->delete('lqp_session', '`lastvisit`<149...') #4 /home/www/yst2/lqper/class/session/session_mysql.class.php(102): model->delete('`lastvisit`<149...') #5 /home/www/yst2/lqper/class/session/session_mysql.class.php(43): session_mysql->gc(3600) #6 [internal function]: session_mysql->close() #7 {main} thrown in /home/www/yst2/lqper/class/db/mysql.class.php on line 55