discuz! Database Error Solution Rollup

Source: Internet
Author: User

discuz! Database Error

(2003) Notconnect

PHP Debug

No. File Line Code
1 forum.php discuz_application->init ()
2 source/class/discuz/discuz_application.php discuz_application->_init_db ()
3 source/class/discuz/discuz_application.php 399 Discuz_database::init (%s, Array)
4 source/class/discuz/discuz_database.php Db_driver_mysql->connect ()
5 source/class/db/db_driver_mysql.php Db_driver_mysql->_dbconnect (%s,%s,%s,%s,%s,%s)
6 source/class/db/db_driver_mysql.php Db_driver_mysql->halt (%s,%d)
7 source/class/db/db_driver_mysql.php 224 Break ()


solution One, also the most common problem

Install directory/config/config_global.php
Install directory/config/config_ucenter.php
installation directory/uc_server/data/config.inc.php (easy to omit)

The changes are roughly:

Define (' uc_dbhost ', ' localhost ');/generally localhost, remote database to fill in the corresponding IP
Define (' Uc_dbuser ', ' user ');//Database username
Define (' UC_DBPW ', ' password ');//Database with password
Define (' Uc_dbname ', ' database ');//DB name

Solution Two, a rare problem

Workaround:
1, stop the Web server work;
2, use the net stop MySQL command to stop MySQL work;
3, the manual package backup mysql below the data packet;
4, to the BBS or wwwroot below delete all files, that is, empty operation;
5, re-copy DZ program to perform a new installation;
6, the use of net start MySQL command to start the MySQL service work;
7, start the Web server and browse the homepage or see if there are any new problems, this time because it is a new installation so the problem opportunity for 0!
8, use the net stop MySQL command to stop the MySQL service;
9, extract the data packet and cover to the original location
10, the use of net start MySQL command to start the MySQL service work;
11, restart the Web server!

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.