Ookma-Kyi
04/27/2023, 7:49 PMERROR (5.5.2+00578)
Could not create connection to database server.
C:\Users\ookma\.CommandBox\cfml\modules\commandbox-migrations\modules\cfmigrations\models\QBMigrationManager.cfc
while trying to run the command box migrate up
in the terminal. I have verified my database setting in the Lucee admin. I can also verify that the app itself seems to be able to access the database as seen in the attached screenshot. I also tried disabling SSL and it still doesn't work.I am getting the error:
ERROR (5.5.2+00578)
Could not create connection to database server.
C:\Users\ookma\.CommandBox\cfml\modules\commandbox-migrations\modules\cfmigrations\models\QBMigrationManager.cfc
while trying to run the command box migrate up
in the terminal. I have verified my database setting in the Lucee admin. I can also verify that the app itself seems to be able to access the database as seen in the attached screenshot. I also tried disabling SSL and it still doesn't work.jsteinshouer
04/27/2023, 7:53 PM.cfmigrations.json
configuration file. Take a look at the readme for an example here.
https://github.com/commandbox-modules/commandbox-migrationsOokma-Kyi
04/27/2023, 8:00 PM{
"default": {
"manager": "cfmigrations.models.QBMigrationManager",
"migrationsDirectory": "resources/database/migrations/",
"seedsDirectory": "resources/database/seeds/",
"properties": {
"defaultGrammar": "AutoDiscover@qb",
"schema": "${DB_SCHEMA}",
"migrationsTable": "cfmigrations",
"connectionInfo": {
"password": "${DB_PASSWORD}",
"connectionString": "${DB_CONNECTIONSTRING}",
"class": "${DB_CLASS}",
"username": "${DB_USER}",
"bundleName": "${DB_BUNDLENAME}",
"bundleVersion": "${DB_BUNDLEVERSION}"
}
}
}
}
Same issuejsteinshouer
04/27/2023, 8:01 PM.env
file with the connection info and credentials?
i.e.
# MYSQL VERSION
DB_SCHEMA=test_db
DB_DATABASE=test_db
DB_CLASS=org.gjt.mm.mysql.Driver
DB_CONNECTIONSTRING=jdbc:<mysql://localhost:3306/test_db?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true>
DB_USER=test
DB_PASSWORD=pass1234
Ookma-Kyi
04/27/2023, 8:02 PMOokma-Kyi
04/27/2023, 8:09 PMjsteinshouer
04/27/2023, 8:12 PMbox env show
do you see the variables listed i.e. DB_CONNECTIONSTRING, etc?jsteinshouer
04/27/2023, 8:20 PMcommandbox-dotenv
if you do not already have it. I think it is bundled in the most recent version.
box install commandbox-dotenv
Ookma-Kyi
04/27/2023, 8:21 PMPS D:\ookma-kyi-core> box env show
{
"DB_DATABASE":"ookma-kyi",
"APPNAME":"ookma-kyi",
"ENVIRONMENT":"development",
"DB_HOST":"127.0.0.1",
"DB_USER":"root",
"DB_BUNDLEVERSION":"5.1.38",
"DB_PASSWORD":"ok12345",
"DB_BUNDLENAME":"com.mysql.jdbc",
"DB_PORT":"3306",
"DB_SCHEMA":"ookma-kyi",
"DB_CONNECTIONSTRING":"jdbc:<mysql://127.0.0.1:3306/ookma-kyi?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useLegacyDatetimeCode=true>",
"DB_DRIVER":"MySQL",
"DB_CLASS":"com.mysql.jdbc.Driver"
jsteinshouer
04/27/2023, 8:32 PMOokma-Kyi
04/27/2023, 8:35 PMelpete
04/28/2023, 4:34 PMbox migrate up
with the --verbose
flag? (box migrate up --verbose
)elpete
04/28/2023, 4:35 PMelpete
04/28/2023, 4:36 PMDB_CLASS=com.mysql.cj.jdbc.Driver
DB_BUNDLEVERSION=8.0.19
DB_BUNDLENAME=com.mysql.cj
Ookma-Kyi
05/01/2023, 2:44 AMelpete
05/01/2023, 2:48 AMOokma-Kyi
05/01/2023, 2:59 AMcoldbox create app foobar skeleton=cbtemplate-quick-with-auth
it produced:
"DB_DATABASE":"Coldbox"
"APPNAME":"Coldbox"
"ENVIRONMENT":"development"
"DB_HOST":"127.0.0.1"
"DB_USER":"root"
"DB_BUNDLEVERSION":"5.1.38"
"DB_PASSWORD":""
"DB_BUNDLENAME":"com.mysql.jdbc"
"DB_PORT":"3306"
"DB_SCHEMA":"Coldbox"
"DB_CONNECTIONSTRING":"jdbc:<mysql://127.0.0.1:3306/Coldbox?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useLegacyDatetimeCode=true>"
"DB_DRIVER":"MySQL",
"DB_CLASS":"com.mysql.jdbc.Driver"
Am I supposed to update that setting, and if so where do I find out what driver settings I am using?elpete
05/01/2023, 4:31 AMelpete
05/01/2023, 4:32 AM