1

I am attempting to migrate the content from Form Builder for Craft 2 to Form Builder for Craft 3 by Roundhouse, by using the following command in terminal: ./craft migrate/up --plugin=roundhouse/form-builder

However, this is then returning an error telling me my Database credentials are incorrect, despite the fact that I have been and can still access and use the website and its database through every other avenue. The error message given is as follows:

Jamess-iMac:multipaneluk jeb$ ./craft migrate/up --plugin=roundhouse/form-builder
Password:
Exception 'craft\errors\DbConnectException' with message 'Craft CMS can’t connect to the database with the credentials in config/db.php.'

in /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/db/Connection.php:171

Stack trace:
#0 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/Connection.php(1022): craft\db\Connection->open()
#1 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/Connection.php(1009): yii\db\Connection->getMasterPdo()
#2 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/mysql/QueryBuilder.php(406): yii\db\Connection->getSlavePdo()
#3 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/mysql/QueryBuilder.php(430): yii\db\mysql\QueryBuilder->supportsFractionalSeconds()
#4 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/mysql/QueryBuilder.php(59): yii\db\mysql\QueryBuilder->defaultTimeTypeMap()
#5 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/db/mysql/QueryBuilder.php(27): yii\db\mysql\QueryBuilder->init()
#6 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\db\mysql\QueryBuilder->init()
#7 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/QueryBuilder.php(116): yii\base\BaseObject->__construct(Array)
#8 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/db/mysql/Schema.php(65): yii\db\QueryBuilder->__construct(Object(craft\db\Connection), Array)
#9 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/Schema.php(248): craft\db\mysql\Schema->createQueryBuilder()
#10 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/Connection.php(856): yii\db\Schema->getQueryBuilder()
#11 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/Query.php(157): yii\db\Connection->getQueryBuilder()
#12 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/db/Query.php(302): yii\db\Query->createCommand(Object(craft\db\Connection))
#13 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/db/Query.php(188): yii\db\Query->scalar(Object(craft\db\Connection))
#14 [internal function]: craft\db\Query->scalar(Object(craft\db\Connection))
#15 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/caching/DbQueryDependency.php(106): call_user_func(Array, Object(craft\db\Connection))
#16 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/caching/DbQueryDependency.php(85): yii\caching\DbQueryDependency->executeQuery(Object(craft\db\Query), Object(craft\db\Connection))
#17 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/caching/Dependency.php(86): yii\caching\DbQueryDependency->generateDependencyData(Object(yii\caching\FileCache))
#18 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/caching/Cache.php(142): yii\caching\Dependency->isChanged(Object(yii\caching\FileCache))
#19 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/caching/Cache.php(593): yii\caching\Cache->get('8e0694a5966c89b...')
#20 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/services/ProjectConfig.php(1775): yii\caching\Cache->getOrSet('projectConfig:i...', Object(Closure), NULL, Object(yii\caching\DbQueryDependency))
#21 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/services/ProjectConfig.php(1625): craft\services\ProjectConfig->_loadInternalConfigData()
#22 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/services/ProjectConfig.php(1614): craft\services\ProjectConfig->_getStoredConfig()
#23 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/services/ProjectConfig.php(399): craft\services\ProjectConfig->_getLoadedConfig()
#24 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/base/ApplicationTrait.php(1426): craft\services\ProjectConfig->get('system.timeZone')
#25 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/base/ApplicationTrait.php(1384): craft\console\Application->_setTimeZone()
#26 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/console/Application.php(57): craft\console\Application->_preInit()
#27 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\console\Application->init()
#28 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#29 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application->__construct(Array)
#30 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/src/console/Application.php(48): yii\console\Application->__construct(Array)
#31 [internal function]: craft\console\Application->__construct(Array)
#32 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/di/Container.php(400): ReflectionClass->newInstanceArgs(Array)
#33 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/di/Container.php(159): yii\di\Container->build('craft\\console\\A...', Array, Array)
#34 /Users/jeb/Sites/multipaneluk/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('craft\\console\\A...', Array, Array)
#35 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/bootstrap/bootstrap.php(245): yii\BaseYii::createObject(Array)
#36 /Users/jeb/Sites/multipaneluk/vendor/craftcms/cms/bootstrap/console.php(43): require('/Users/jeb/Site...')
#37 /Users/jeb/Sites/multipaneluk/craft(21): require('/Users/jeb/Site...')
#38 {main}

I've tried using mysql in both Mamp and running through Homebrew, neither of these worked. .env credentials are 100% correct. Can't think what could be causing this.

Many thanks

2

We had something similar yesterday. Try the following 2 tweaks:

1.) Delete your storage/runtime folder and then try again

2.) If this does not help, verify the credentials in your .env file and make sure they use a DSN like: DB_DSN="mysql:host=<dbhost>;port=<dbport>;dbname=<dbname>;"

3
  • 1
    I'm placing a bet on number 1 :) It was a bug and it's now fixed (3.4.19.1) – Oli May 15 '20 at 11:55
  • Tried both of those, still getting the same issue :( – jeb May 18 '20 at 6:44
  • sorry no more ideas – Matthias Redl-Mann May 18 '20 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.