Solution to UCenter info: Can not connect to MySQL server

Source: Internet
Author: User
Tags php and

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 ');

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.