Modify the configuration file of Discuz. Find
Install/config/config_global.php and/uc_server/data/config. inc. php.
OK. No error is returned. However, whether you click Register or log on, an "internal error is returned and this content cannot be displayed" will appear. Then, click the error prompt, the preceding "UCenter info: Can not connect to MySQL server" is displayed. The database cannot be connected.
It's strange, but it's okay to log on to the UCenter via http: // localhost/bbs/uc_server/. The application settings also show that the communication is successful, after downloading the data, I also entered here to modify the domain name binding.
Major errors:
UCenter info: Can not connect to MySQL server
Error:
Errno: 0
The files to be modified are as follows:
Installation directory/config/config_global.php
Installation directory/config/config_ucenter.php
Installation directory/uc_server/data/config. inc. php
How can I change it to an example?
The code is as follows: |
Copy code |
Config_global // ------------------ Config db -------------------// $ _ Config ['DB'] ['1'] ['dbhost'] = 'localhost '; $ _ Config ['DB'] ['1'] ['dbuser'] = 'a064322111 '; $ _ Config ['DB'] ['1'] ['dbpw '] = 321423432; $ _ Config ['DB'] ['1'] ['dbcharset'] = 'utf8 '; $ _ Config ['DB'] ['1'] ['pconnect '] = '0 '; $ _ Config ['DB'] ['1'] ['dbname'] = 'a064322111 '; $ _ Config ['DB'] ['1'] ['tablepre'] = 'pre _';
|
Config_ucenter
The code is as follows: |
Copy code |
<? Php Define ('UC _ CONNECT ', 'mysql ');
Define ('UC _ dbhost', 'localhost '); Define ('UC _ dbuser', 'a064322111 '); Define ('UC _ DBPW ', '20140901 '); Define ('UC _ dbname', 'a064322111 '); Define ('UC _ dbcharset', 'utf8 '); Define ('UC _ dbtablepre', ''a064322111 '. pre_ucenter _'); Define ('UC _ DBCONNECT ', 0 ); Define ('UC _ charset', 'utf-8 '); Define ('UC _ key', 'hangzhou '); Define ('UC _ api', 'http: // www.111cn.net/uc_server '); Define ('UC _ APPID ', '1 '); Define ('UC _ IP', '2017. 0.0.1 '); Define ('UC _ PPP ', 20 ); ?> |
Config. inc
The code is as follows: |
Copy code |
<? Php Define ('UC _ dbhost', 'localhost '); Define ('UC _ dbuser', 'a064322111 '); Define ('UC _ DBPW ', '20140901 '); Define ('UC _ dbname', 'a064322111 '); Define ('UC _ dbcharset', 'utf8 '); Define ('UC _ dbtablepre', 'pre _ ucenter _'); Define ('UC _ COOKIEPATH ','/'); Define ('UC _ COOKIEDOMAIN ',''); Define ('UC _ DBCONNECT ', 0 ); Define ('UC _ charset', 'utf-8 '); |