-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot connect to database after installation #2069
Comments
same error :( |
That error is pretty accurate; I don't think we've seen any instances where that error has been incorrectly thrown. It is saying that your database username and/or your database password are not correct. You can use mysql on the command-line to check - you should be able to do something like: mysql --host=<your_mysql_ip> -u <your_username> -p <your_database_name> And then type in your MySQL database password when prompted. If you can get in - then something else is broken. If you can't - then that's the problem; one or more of your IP, username, password, or database name are wrong. |
Hi I did use mysql on the command-line to check, and I was able to login to the database, finally I got it working by using the root account of mysql, something is wrong with the permissions about the database and the database user that are created by the installation script. |
Expected Behavior (or desired behavior if a feature request)
I should be able to see the logon screen after successful installation
Actual Behavior
I did a manual installation on CentOS Linux release 7.2.1511 (Core), I have double checked that the credentials inside app/config/production/database.php are correct and I also checked that I can connect to the database with the above credentials from command line also when I enable the debug mode nothing different happens.
Please confirm you have done the following before posting your bug report:
Please provide answers to these questions before posting your bug report:
the latest
CentOS Linux release 7.2.1511 (Core) - Apache
install.sh and then manual installation
ErrorException thrown with message "SQLSTATE[28000] [1045] Access denied for user 'snipeit'@'localhost' (using password: YES) (View: /var/www/html/snipeit/app/views/backend/layouts/default.blade.php) (View: /var/www/html/snipeit/app/views/backend/layouts/default.blade.php)"
Stacktrace:
#43 ErrorException in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47
#42 Illuminate\View\Engines\CompilerEngine:handleViewException in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:41
#41 ErrorException in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47
#40 Illuminate\View\Engines\CompilerEngine:handleViewException in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:41
#39 PDOException in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47
#38 PDO:__construct in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47
#37 Illuminate\Database\Connectors\Connector:createConnection in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:20
#36 Illuminate\Database\Connectors\MySqlConnector:connect in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:57
#35 Illuminate\Database\Connectors\ConnectionFactory:createSingleConnection in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:46
#34 Illuminate\Database\Connectors\ConnectionFactory:make in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:176
#33 Illuminate\Database\DatabaseManager:makeConnection in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:64
#32 Illuminate\Database\DatabaseManager:connection in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:2922
#31 Illuminate\Database\Eloquent\Model:resolveConnection in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:2888
#30 Illuminate\Database\Eloquent\Model:getConnection in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1849
#29 Illuminate\Database\Eloquent\Model:newBaseQueryBuilder in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1790
#28 Illuminate\Database\Eloquent\Model:newQueryWithoutScopes in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1764
#27 Illuminate\Database\Eloquent\Model:newQuery in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:656
#26 Illuminate\Database\Eloquent\Model:find in /var/www/html/snipeit/app/models/Setting.php:10
#25 Setting:getSettings in /var/www/html/snipeit/app/storage/views/630c7f6ad6db333384aae82658c0a93d:12
#24 include in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:37
#23 Illuminate\View\Engines\PhpEngine:evaluatePath in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:56
#22 Illuminate\View\Engines\CompilerEngine:get in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php:134
#21 Illuminate\View\View:getContents in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php:102
#20 Illuminate\View\View:renderContents in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php:76
#19 Illuminate\View\View:render in /var/www/html/snipeit/app/storage/views/9c5f9c3c264e6ab9e9005b6e2367b1d4:67
#18 include in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php:37
#17 Illuminate\View\Engines\PhpEngine:evaluatePath in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:56
#16 Illuminate\View\Engines\CompilerEngine:get in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php:134
#15 Illuminate\View\View:getContents in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php:102
#14 Illuminate\View\View:renderContents in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php:76
#13 Illuminate\View\View:render in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php:43
#12 Illuminate\Http\Response:setContent in /var/www/html/snipeit/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php:202
#11 Symfony\Component\HttpFoundation\Response:__construct in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1501
#10 Illuminate\Routing\Router:prepareResponse in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1036
#9 Illuminate\Routing\Router:dispatchToRoute in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1001
#8 Illuminate\Routing\Router:dispatch in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:775
#7 Illuminate\Foundation\Application:dispatch in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:745
#6 Illuminate\Foundation\Application:handle in /var/www/html/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php:34
#5 Barryvdh\Debugbar\Middleware\Stack:handle in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware.php:72
#4 Illuminate\Session\Middleware:handle in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php:47
#3 Illuminate\Cookie\Queue:handle in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php:51
#2 Illuminate\Cookie\Guard:handle in /var/www/html/snipeit/vendor/stack/builder/src/Stack/StackedHttpKernel.php:23
#1 Stack\StackedHttpKernel:handle in /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:641
#0 Illuminate\Foundation\Application:run in /var/www/html/snipeit/public/index.php:49
default page
app/storage/logs
and your webserver's logs.The text was updated successfully, but these errors were encountered: