Unable to access mysql database


#1

So, I just set Dreamfactory up on my Linux server, connected the database, however I can’t seem to access it or even view the table schema. I get a weird response in every request through the api docs. Here’s what it looks like…

{
“error”: {
“context”: null,
“message”: “SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: ‘’”,
“code”: “42000”,
“trace”: [
“0 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(40): PDO->prepare(‘set names ‘’ co…’)”,
“1 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(11504): Illuminate\Database\Connectors\MySqlConnector->connect(Array)”,
“2 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()”,
“3 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php(908): call_user_func(Object(Closure))”,
“4 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php(776): Illuminate\Database\Connection->getPdo()”,
“5 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php(661): Illuminate\Database\Connection->reconnectIfMissingConnection()”,
“6 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php(342): Illuminate\Database\Connection->run(‘SHOW DATABASES …’, Array, Object(Closure))”,
“7 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Database/Schema/Schema.php(309): Illuminate\Database\Connection->select(‘SHOW DATABASES …’, Array)”,
“8 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Database/Schema/MySqlSchema.php(443): DreamFactory\Core\Database\Schema\Schema->selectColumn(‘SHOW DATABASES …’)”,
“9 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Database/Schema/Schema.php(418): DreamFactory\Core\Database\Schema\MySqlSchema->findSchemaNames()”,
“10 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Database/Schema/Schema.php(747): DreamFactory\Core\Database\Schema\Schema->getSchemaNames(false)”,
“11 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Database/Schema/Schema.php(718): DreamFactory\Core\Database\Schema\Schema->getCachedTableNames(true, false)”,
“12 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-sqldb/src/Services/SqlDb.php(191): DreamFactory\Core\Database\Schema\Schema->getTableNames(’’, true, false)”,
“13 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Resources/BaseDbSchemaResource.php(97): DreamFactory\Core\SqlDb\Services\SqlDb->getTableNames(’’, false)”,
“14 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(460): DreamFactory\Core\Resources\BaseDbSchemaResource->getResources()”,
“15 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Resources/BaseDbSchemaResource.php(306): DreamFactory\Core\Components\RestHandler->handleGET()”,
“16 [internal function]: DreamFactory\Core\Resources\BaseDbSchemaResource->handleGET()”,
“17 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(267): call_user_func(Array)”,
“18 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(173): DreamFactory\Core\Components\RestHandler->processRequest()”,
“19 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(220): DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘’)”,
“20 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Services/BaseDbService.php(117): DreamFactory\Core\Components\RestHandler->handleResource(Array)”,
“21 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(168): DreamFactory\Core\Services\BaseDbService->handleResource(Array)”,
“22 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Services/BaseRestService.php(74): DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘_schema’)”,
“23 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17036): DreamFactory\Core\Services\BaseRestService->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘_schema’)”,
“24 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(16997): DreamFactory\Http\Controllers\RestController->handleService(‘v2’, ‘inventory’, ‘_schema’)”,
“25 [internal function]: DreamFactory\Http\Controllers\RestController->handleGET(‘v2’, ‘inventory’, ‘_schema’)”,
“26 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9093): call_user_func_array(Array, Array)”,
“27 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9155): Illuminate\Routing\Controller->callAction(‘handleGET’, Array)”,
“28 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9135): Illuminate\Routing\ControllerDispatcher->call(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), ‘handleGET’)”,
“29 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“30 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“31 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17209): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“32 [internal function]: DreamFactory\Http\Middleware\AccessCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“33 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“34 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“35 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“36 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“37 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9612): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“38 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9136): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,
“39 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9123): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘handleGET’)”,
“40 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8191): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘DreamFactory\Ht…’, ‘handleGET’)”,
“41 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8178): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))”,
“42 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7892): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))”,
“43 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“44 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“45 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“46 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9612): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“47 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7893): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,
“48 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7884): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))”,
“49 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7874): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))”,
“50 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2416): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))”,
“51 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))”,
“52 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“53 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/app/Http/Middleware/AuthCheck.php(178): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“54 [internal function]: DreamFactory\Http\Middleware\AuthCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“55 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“56 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“57 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“58 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/barryvdh/laravel-cors/src/HandleCors.php(34): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“59 [internal function]: Barryvdh\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“60 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“61 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“62 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“63 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17306): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“64 [internal function]: DreamFactory\Http\Middleware\FirstUserCheck->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“65 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“66 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“67 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“68 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(13076): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“69 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“70 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“71 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“72 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“73 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(11622): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“74 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“75 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“76 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“77 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“78 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12815): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“79 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“80 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“81 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“82 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“83 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12752): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“84 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“85 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“86 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“87 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“88 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(3271): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“89 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))”,
“90 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9627): call_user_func_array(Array, Array)”,
“91 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))”,
“92 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“93 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))”,
“94 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9612): call_user_func(Object(Closure), Object(Illuminate\Http\Request))”,
“95 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2363): Illuminate\Pipeline\Pipeline->then(Object(Closure))”,
“96 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2347): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))”,
“97 /home/alex/dreamfactory-2.2.0-0/apps/dreamfactory/htdocs/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))”,
“98 {main}”
]
}
}

Any thoughts?


#2

I am sure this is something you have checked but just in case, on your ssh terminal double check your username and pass for that databse or via phpmyadmin. Try restarting the mysql service.


#3

looks like you added a charset setting to the definition and then removed it, yes?

Unfortunately there’s a bug we just found where those types of service settings don’t get unset when you remove them – the become set to an empty string, which makes the driver angry. There’s a bug files for this, but you can work around it by deleting your service and recreating it (without setting that option.) Or you could set it something valid, like utf8.