Database connection problems

Source: Internet
Author: User
What should I do if this error occurs when I connect to the database? Thank you for your help! CDbException description CDbConnection cannot enable the database connection: SQLSTATE [28000] [1045] Accessdeniedforuser 's6411' @ 'localhost'
What should I do if this error occurs? Thank you for your help!
CDbException
Description
CDbConnection cannot enable the database connection: SQLSTATE [28000] [1045] Access denied for user 'zs6411' @ 'localhost' (using password: YES)

SOURCE file
E: \ TopShare \ htdocs \ yii \ framework \ db \ CDbConnection. php (255)

00243 :{
00244: if (empty ($ this-> connectionString ))
00245: throw new CDbException (Yii: t ('yii', 'cdbconnection. connectionString cannot be empty .'));
00246: try
00247 :{
00248: Yii: trace ('opening DB connection', 'system. db. cdbconnection ');
00249: $ this-> _ pdo = $ this-> createPdoInstance ();
00250: $ this-> initConnection ($ this-> _ pdo );
00251: $ this-> _ active = true;
00252 :}
00253: catch (PDOException $ e)
00254 :{
00255: throw new CDbException (Yii: t ('yii', 'cdbconnection failed to open the DB connection: {error }',
00256: array ('{error}' => $ e-> getMessage ())));
00257 :}
00258 :}
00259 :}
00260:
00261 :/**
00262: * Closes the currently active DB connection.
00263: * It does nothing if the connection is already closed.
00264 :*/
00265: protected function close ()
00266 :{
00267: Yii: trace ('closing DB connection', 'system. db. cdbconnection ');
Stack tracing
#0 E: \ TopShare \ htdocs \ yii \ framework \ db \ CDbConnection. php (230): CDbConnection-> open ()
#1 E: \ TopShare \ htdocs \ yii \ framework \ db \ CDbConnection. php (209): CDbConnection-> setActive (true)
#2 E: \ TopShare \ htdocs \ yii \ framework \ base \ CModule. php (353): CDbConnection-> init ()
#3 E: \ TopShare \ htdocs \ yii \ framework \ base \ CApplication. php (373): CModule-> getComponent ('DB ')
#4 E: \ TopShare \ htdocs \ yii \ framework \ db \ ar \ CActiveRecord. php (876): CApplication-> getDb ()
#5 E: \ TopShare \ htdocs \ yii \ framework \ db \ ar \ CActiveRecord. php (2242): CActiveRecord-> getDbConnection ()
#6 E: \ TopShare \ htdocs \ yii \ framework \ db \ ar \ CActiveRecord. php (656): CActiveRecordMetaData->__ construct (Object (public_user ))
#7 E: \ TopShare \ htdocs \ toplinker-web \ protected \ models \ public_user.php (15): CActiveRecord: model ('public _ user ')
#8 E: \ TopShare \ htdocs \ toplinker-web \ protected \ components \ UserIdentity. php (20): public_user: model ()
#9 E: \ TopShare \ htdocs \ toplinker-web \ protected \ models \ LoginForm. php (48): UserIdentity-> authenticate ()
#10 E: \ TopShare \ htdocs \ yii \ framework \ validators \ CInlineValidator. php (39): LoginForm-> authenticate ('password', Array)
#11 E: \ TopShare \ htdocs \ yii \ framework \ validators \ CValidator. php (163): CInlineValidator-> validateAttribute (Object (LoginForm), 'password ')
#12 E: \ TopShare \ htdocs \ yii \ framework \ base \ CModel. php (187): CValidator-> validate (Object (LoginForm), NULL)
#13 E: \ TopShare \ htdocs \ toplinker-web \ protected \ controllers \ SiteController. php (42): CModel-> validate ()
#14 E: \ TopShare \ htdocs \ yii \ framework \ web \ actions \ CInlineAction. php (32): SiteController-> actionLogin ()
#15 E: \ TopShare \ htdocs \ yii \ framework \ web \ CController. php (300): CInlineAction-> run ()
#16 E: \ TopShare \ htdocs \ yii \ framework \ web \ CController. php (278): CController-> runAction (Object (CInlineAction ))
#17 E: \ TopShare \ htdocs \ yii \ framework \ web \ CController. php (257): CController-> runActionWithFilters (Object (CInlineAction), Array)
#18 E: \ TopShare \ htdocs \ yii \ framework \ web \ CWebApplication. php (310): CController-> run ('login ')
#19 E: \ TopShare \ htdocs \ yii \ framework \ web \ CWebApplication. php (120): CWebApplication-> runController ('site/login ')
#20 E: \ TopShare \ htdocs \ yii \ framework \ base \ CApplication. php (135): CWebApplication-> processRequest ()
#21 E: \ TopShare \ htdocs \ toplinker-web \ index. php (11): CApplication-> run ()
#22 {main} 2010-01-25 03:43:00 Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 mod_perl/2.0.3 Perl/v5.8.8 Yii Framework/1.0.10

------ Solution --------------------

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.