Discuz!发论坛短消息提示mysql数据库错误

pop:之前在其他的主机转到虎翼门户通的空间,只记得修改主论坛数据库的配置,忘记了这个ucenter的配置了。

症状:
登陆、发帖等均正常的,但是不能发论坛短消息,提示如下错误信息
Can not connect to MySQL server
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

解决办法:
出现这样的提示主要就是论坛的主数据库路径设置正确,但是ucenter的数据库设置错误导致,将ucenter的数据库设置修改即可

具体步骤如下:
打开论坛的ucenter下的data目录下config.inc.php

将里面的配置请参照您论坛的数据库参数来写,如

define('UC_DBHOST', '服务器地址');
define('UC_DBUSER', '数据库用户名');
define('UC_DBPW', '数据库密码');
define('UC_DBNAME', '数据库名称');
define('UC_DBCHARSET', 'utf8');
define('UC_DBTABLEPRE', 'uc_');
define('UC_COOKIEPATH', '/');
define('UC_COOKIEDOMAIN', '');
define('UC_DBCONNECT', 0);
define('UC_CHARSET', 'utf-8');
define('UC_FOUNDERPW', '7936b00bbb4077f41d529875ae1a3800');
define('UC_FOUNDERSALT', '221254');
define('UC_KEY', 'dpeb7xdxaa0D5N4H1r2s5E9sfJ9ffier660N6F373dc2cyczdD1K1T5Bc09n7N9G');
define('UC_SITEID', 'dceP7ldbaR0C5T4q1M2B5e9HfT9efIeW6N0c6T3o3Bc2cdc7dx1S1D54ci967k9L');
define('UC_MYKEY', 'dEea7idcaJ0g5H4J1K2Z5u9ufA9rf5ea6m0L6a3p3NcDcZcUdT1L1H5ucC9d7e9N');
define('UC_DEBUG', false);
define('UC_PPP', 20);

This entry was posted in Technology and tagged , , . Bookmark the permalink. 5,436 views

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *