Fatal Error in Gdn_Database.Connection();
This issue happened after my first installation. How to fix this?
Fatal Error in Gdn_Database.Connection();
An error occurred while attempting to connect to the database
SQLSTATE[HY000] [1045] Access denied for user 'i1498762_vf1'@'localhost' (using password: YES)
The error occurred on or near: /home/xxxx/public_html/forum/library/database/class.database.php171: if ($Timeout) { 172: throw new Exception(errorMessage('Timeout while connecting to the database', $this->ClassName, 'Connection', $ex->getMessage()), 504); 173: } 174: 175: throw new Exception(errorMessage('An error occurred while attempting to connect to the database', $this->ClassName, 'Connection', $ex->getMessage()), 500); 176: } 177: 178: return $PDO; 179: }
Backtrace:[/home/xxxx/public_html/forum/library/database/class.database.php:102] Gdn_Database->newPDO(); [/home/xxxx/public_html/forum/library/database/class.database.php:494] Gdn_Database->connection(); [/home/xxxx/public_html/forum/library/database/class.database.php:368] Gdn_Database->slave(); [/home/xxxx/public_html/forum/library/database/class.sqldriver.php:1663] Gdn_Database->query(); [/home/xxxx/public_html/forum/library/database/class.sqldriver.php:884] Gdn_SQLDriver->query(); [/home/xxxx/public_html/forum/applications/dashboard/models/class.rolemodel.php:208] Gdn_SQLDriver->getWhere(); [/home/xxxx/public_html/forum/applications/dashboard/models/class.permissionmodel.php:512] RoleModel::getDefaultRoles(); [/home/xxxx/public_html/forum/applications/dashboard/models/class.usermodel.php:1027] PermissionModel->cachePermissions(); [/home/xxxx/public_html/forum/library/core/class.session.php:420] UserModel->definePermissions(); [/home/xxxx/public_html/forum/library/core/class.auth.php:59] Gdn_Session->start(); [/home/xxxx/public_html/forum/bootstrap.php:237] Gdn_Auth->startAuthenticator(); [/home/xxxx/public_html/forum/index.php:32] PHP::require_once();
Additional information for support personnel:
- Application: Vanilla
- Application Version: 2.2
- PHP Version: 5.4.43
- Operating System: Linux
- Server Software: Apache/2.4.12
- User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
- Request Uri: /forum/index.php?p=dashboard/settings
- Controller: Gdn_Database
- Method: Connection
Best Answer
-
whu606 MVP
Welcome to the community.
That error suggests that the login information in conf/config.php for your database is incorrect.
Use something like phpMyAdmin to check what user permissions there are.
It seems unlikely that your password to access the DB is really 'YES'.
Find or create a user with permission to access the DB you created for Vanilla, and edit the config.php file.
5
Answers
@XDDD
Welcome to the community.
That error suggests that the login information in conf/config.php for your database is incorrect.
Use something like phpMyAdmin to check what user permissions there are.
It seems unlikely that your password to access the DB is really 'YES'.
Find or create a user with permission to access the DB you created for Vanilla, and edit the config.php file.
@whu606
Thanks for answering me! But I got a new error.
How can I do now?
Fatal Error in PHP.trigger_error();
Table 'i2147439_vf1.vf_UserCategory' doesn't exist
The error occurred on or near: /home/xxxx/public_html/forum/library/database/class.database.php
418: $this->closeConnection(); 419: continue; 420: } 421: 422: trigger_error($message, E_USER_ERROR); 423: } 424: 425: } 426:
Backtrace:
/home/xxxx/public_html/forum/library/database/class.database.phpPHP::Gdn_ErrorHandler(); [/home/xxxx/public_html/forum/library/database/class.database.php:422] PHP::trigger_error(); [/home/xxxx/public_html/forum/library/database/class.sqldriver.php:1663] Gdn_Database->query(); [/home/xxxx/public_html/forum/library/database/class.sqldriver.php:884] Gdn_SQLDriver->query(); [/home/xxxx/public_html/forum/applications/vanilla/models/class.categorymodel.php:733] Gdn_SQLDriver->getWhere(); [/home/xxxx/public_html/forum/applications/vanilla/models/class.categorymodel.php:158] CategoryModel::joinUserData(); [/home/xxxx/public_html/forum/applications/vanilla/models/class.categorymodel.php:80] CategoryModel::categories(); [/home/xxxx/public_html/forum/applications/vanilla/models/class.discussionmodel.php:1132] CategoryModel::categoryWatch(); [/home/xxxx/public_html/forum/applications/vanilla/controllers/class.discussionscontroller.php:131] DiscussionModel->getCount(); [/home/xxxx/public_html/forum/applications/vanilla/controllers/class.discussionscontroller.php:131] DiscussionsController->index(); [/home/xxxx/public_html/forum/library/core/class.dispatcher.php:329] PHP::call_user_func_array(); [/home/xxxx/public_html/forum/index.php:44] Gdn_Dispatcher->dispatch();
Variables in local scope:
[Sql] 'select * from vf_UserCategory
UserCategorywhere UserID = :UserID' [InputParameters] array ( ':UserID' => '1', ) [Options] array ( 'Type' => 'select', 'Slave' => NULL, 'ReturnType' => 'DataSet', ) [ReturnType] 'DataSet' [tries] 2 [try] 0 [PDO] array ( ) [PDOStatement] false [ex] array ( ) [message] 'Table \'i2147439_vf1.vf_UserCategory\' doesn\'t exist' [code] 1146 [state] '42S02'
Additional information for support personnel:
NVM, I figured it out! All issues was happened because of my stupid host.