Contentify: Get this error trying to do the install using DigitalOcean

Created on 14 Jun 2017  路  9Comments  路  Source: Contentify/Contentify

Whoops, looks like something went wrong.

1/1
PDOException in Connector.php line 55:
SQLSTATE[HY000] [2002] Connection refused
in Connector.php line 55
at PDO->__construct('mysql:host=123.123.123.123;dbname=contentify2', 'root', '1ffbd05j----------------f3f186', array('0', '2', '0', false, false)) in Connector.php line 55
at Connector->createConnection('mysql:host=104.131.134.241;dbname=contentify2', array('driver' => 'mysql', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'host' => '104.131.134.241', 'database' => 'contentify2', 'username' => 'root', 'password' => '1ffbd05----------------f186', 'name' => 'mysql'), array('0', '2', '0', false, false)) in MySqlConnector.php line 24
at MySqlConnector->connect(array('driver' => 'mysql', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'host' => 123.123.123.123', 'database' => 'contentify2', 'username' => 'root', 'password' => '1ffbd05j----------------f3f18', 'name' => 'mysql')) in ConnectionFactory.php line 61
at ConnectionFactory->Illuminate\Database\Connectors{closure}()
at call_user_func(object(Closure)) in Connection.php line 924
at Connection->getPdo() in Connection.php line 792
at Connection->reconnectIfMissingConnection() in Connection.php line 677
at Connection->run('select count() as aggregate from users where email = ?', array('[email protected]'), object(Closure)) in Connection.php line 349
at Connection->select('select count(
) as aggregate from users where email = ?', array('[email protected]'), false) in Builder.php line 1610
at Builder->runSelect() in Builder.php line 1596
at Builder->get(array('')) in Builder.php line 2002
at Builder->aggregate('count', array('
')) in Builder.php line 1924
at Builder->count() in DatabasePresenceVerifier.php line 58
at DatabasePresenceVerifier->getCount('users', 'email', '[email protected]', null, null, array()) in Validator.php line 1340
at Validator->validateUnique('email', ''[email protected]', array('users', 'email'), object(Validator)) in Validator.php line 485
at Validator->validate('email', 'Unique') in Validator.php line 425
at Validator->passes() in Validator.php line 450
at Validator->fails() in InstallController.php line 70
at InstallController->index()
at call_user_func_array(array(object(InstallController), 'index'), array()) in Controller.php line 80
at Controller->callAction('index', array()) in ControllerDispatcher.php line 146
at ControllerDispatcher->call(object(InstallController), object(Route), 'index') in ControllerDispatcher.php line 94
at ControllerDispatcher->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
at ControllerDispatcher->callWithinStack(object(InstallController), object(Route), object(Request), 'index') in ControllerDispatcher.php line 54
at ControllerDispatcher->dispatch(object(Route), object(Request), 'InstallController', 'index') in Route.php line 174
at Route->runController(object(Request)) in Route.php line 140
at Route->run(object(Request)) in Router.php line 724
at Router->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Router.php line 726
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699
at Router->dispatchToRoute(object(Request)) in Router.php line 675
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing{closure}(object(Request)) in VerifyAdminAccess.php line 37
at VerifyAdminAccess->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyAdminAccess), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in UpdateUser.php line 108
at UpdateUser->handle(object(Request), object(Closure))
at call_user_func_array(array(object(UpdateUser), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 52

help wanted

All 9 comments

I would first try changing the dbhost to 'localhost' in your config, rather than your droplet's IP (assuming you have MySQL on the same droplet).

Okay after that what should i do

JacZGaming when posting error logs on the internet please watch out to remove your personal credentials. I could easily retrieve your ip, your account name and your password for your database from this log. Which would enable me to access your database and do some damage there. You should edit this issue and definitely change your access credentials for your database.

JacZGaming when posting error logs on the internet please watch out to remove your personal credentials.

Thank you for paying attention, I edited the post.

Okay after that what should i do

Here in the log it says:

PDOException in Connector.php line 55:
SQLSTATE[HY000] [2002] Connection refused
in Connector.php line 55

The CMS cannot connect to the database. Open this file with a text editor and make sure the connection details are correct: storage/app/database.ini

I hope that I will be able to run a test tomorrow to make sure the installation still is working on DigitalOcean servers.

@chriskonnertz it still works on DigitalOcean; I tried this afternoon to verify whether the explicit IP or just 'localhost' needed to be set here: https://jrs86.com/contentify/public/

My apologies for not pointing out the credential info warning; I was amidst working on another project, and figured I'd reply here since I recognized the error/solution. That was just poor form on my part; thankfully there are other bright minds around here!

@JacZGaming "Okay after that what should i do"
So long as you've made sure that the DB name, your user name/password, and other settings are correct in the file Chris mentioned storage/app/database.ini (also make sure you've created the DB as ut8_unicode_ci collating), you should be ready to run the installer again. Also, I make no assumptions how you've setup your server/phpMyAdmin; make sure you're using your MySQL password for root user, not your SSH password for root user. If I recall correctly, phpMyAdmin creates the root user without a password at all, unless you explicitly set one during or after install. You can leave that field empty in your Contentify config if you don't have a password (I don't recommend this, just a quick 'gotcha' that it can be done).

@shoostar so should i like Message some one?

Also this is a old droplet

@JacZGaming ...message someone about...? Do you not have access to the file you need to change? We've given you just about everything you need to know to at least get you started on fixing the problem you're running into. Could you post the results of what happened when you tried editing the settings in storage/app/database.ini? Also, have you made sure you created your database properly?

I'm also curious: how did you go about installing Contentify to begin with? Did you simply upload the files via FTP, or have you tried to installing it using the bash script from the Contentify Wiki? I've personally not tried it this way, as I chose to simply upload the files directly through FTP. This process involved literally 0 configuration at all. I was able to simply upload the files, point my browser to the installer URL, and that was it. I'd suggest going back through and double-check that you've followed the install instructions accurately. Judging by your posts in other issue threads, I'm going to assume that you have yet to solve this database connection issue, and that's why you're not able to connect to your site, log in, or do anything else.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

torriz picture torriz  路  5Comments

GaneshKandu picture GaneshKandu  路  4Comments

nrRudiak picture nrRudiak  路  3Comments

andakawa picture andakawa  路  4Comments

MohsinAhmedShaikh picture MohsinAhmedShaikh  路  6Comments