首页 > 代码库 > Discuz:can not connect MySQL server

Discuz:can not connect MySQL server

问题描述:

将Discuz里面的upload放在/home/nginx/html里面,修改777权限

安装:http://localhost/bbs/install/index.php

安装第三步报错:

can not connect MySQL server ...........though socket ‘/var/lib/mysql/mysql.sock‘

查看mysql配置文件/etc/my.cnf,发现sock是放在/tmp/mysql.sock

 

解决办法:

创建连接文件

mkdir /var/lib/mysql/

ln -sv /tmp/mysql.sock /var/lib/mysql/mysql.sock


本文出自 “小新的学习博客” 博客,请务必保留此出处http://oneserver.blog.51cto.com/4776118/1855529

Discuz:can not connect MySQL server