I tried this on Strapi v3 and it works perfectly for Postgres and Mysql.
Strapi v4 manual with Mysql and Postgres fails.
+++++++++++++++++++++++++++++++++++++++
❯ yarn create strapi-starter backend-strapi4 next-corporate
yarn create v1.22.17
warning package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-strapi-starter@4.0.2" with binaries:
create-strapi-starter
? Choose your installation type Custom (manual settings)
Installing @strapi/starter-next-corporate starter.
? Choose your default database client mysql
? Database name: st-strapi4
? Host: 127.0.0.1
? Port: 3306
? Username: admin
? Password: ***
? Enable SSL connection: No
Creating a project with custom database options.
Creating a new Strapi application at /home/xxxxx/dev/sts/backend-strapi4/backend.
Creating files.
Installing @strapi/template-corporate template.
Dependencies installed successfully.
Your application was created at /home/xxxxx/dev/sts/backend-strapi4/backend.
Available commands in your project:
yarn develop
Start Strapi in watch mode. (Changes in Strapi project files will trigger a server restart)
yarn start
Start Strapi without watch mode.
yarn build
Build Strapi admin panel.
yarn strapi
Display all available commands.
You can start by doing:
cd /home/xxxx/dev/sts/backend-strapi4/backend
yarn develop
Creating Strapi starter frontend at /home/xxxxx/dev/sts/backend-strapi4/frontend.
Installing frontend dependencies
Dependencies installed successfully.
Dependencies installed successfully.
Starting the app
yarn run v1.22.17
warning ../../../package.json: No license field
$ cross-env FORCE_COLOR=1 npm-run-all -l -p develop:*
warning ../../../package.json: No license field
warning ../../../package.json: No license field
$ wait-on http://localhost:1337/admin && yarn --cwd frontend develop
$ yarn --cwd backend develop
warning ../../../../package.json: No license field
$ strapi develop
[develop:backend ] Building your admin UI with development configuration ...
[develop:backend ] ℹ Compiling Webpack
[develop:backend ] ✔ Webpack: Compiled successfully in 18.58s
[develop:backend ] Admin UI built successfully
[develop:backend ] [2021-12-28 02:53:44.582] debug: ⛔️ Server wasn't able to start properly.
[develop:backend ] [2021-12-28 02:53:44.583] error: connect ECONNREFUSED 127.0.0.1:3306
[develop:backend ] Error: connect ECONNREFUSED 127.0.0.1:3306
[develop:backend ] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
[develop:backend ] --------------------
[develop:backend ] at Protocol._enqueue (/home/xxxxx/dev/sts/backend-strapi4/backend/node_modules/mysql/lib/protocol/Protocol.js:144:48)
[develop:backend ] at Protocol.handshake (/home/xxxxx/dev/sts/backend-strapi4/backend/node_modules/mysql/lib/protocol/Protocol.js:51:23)
[develop:backend ] at Connection.connect (/home/xxxxxx/dev/sts/backend-strapi4/backend/node_modules/mysql/lib/Connection.js:116:18)
[develop:backend ] at /home/xxxxxxx/dev/sts/backend-strapi4/backend/node_modules/knex/lib/dialects/mysql/index.js:56:18
[develop:backend ] at new Promise ()
[develop:backend ] at Client_MySQL.acquireRawConnection (/home/xxxxxx/dev/sts/backend-strapi4/backend/node_modules/knex/lib/dialects/mysql/index.js:51:12)
[develop:backend ] at create (/home/xxxxx/dev/sts/backend-strapi4/backend/node_modules/knex/lib/client.js:237:39)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "develop:backend" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Command failed with exit code 1: yarn develop
at makeError (/home/xxxxx/.config/yarn/global/node_modules/execa/lib/error.js:60:11)
at handlePromise (/home/xxxx/.config/yarn/global/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async buildStarter (/home/xxxxx/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:201:3)
I tried this on Strapi v3 and it works perfectly for Postgres and Mysql. Strapi v4 manual with Mysql and Postgres fails. +++++++++++++++++++++++++++++++++++++++ ❯ yarn create strapi-starter backend-strapi4 next-corporate yarn create v1.22.17 warning package.json: No license field [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed "create-strapi-starter@4.0.2" with binaries:
Creating a project with custom database options. Creating a new Strapi application at /home/xxxxx/dev/sts/backend-strapi4/backend. Creating files. Installing @strapi/template-corporate template. Dependencies installed successfully.
Your application was created at /home/xxxxx/dev/sts/backend-strapi4/backend.
Available commands in your project:
yarn develop Start Strapi in watch mode. (Changes in Strapi project files will trigger a server restart)
yarn start Start Strapi without watch mode.
yarn build Build Strapi admin panel.
yarn strapi Display all available commands.
You can start by doing:
cd /home/xxxx/dev/sts/backend-strapi4/backend yarn develop
Creating Strapi starter frontend at /home/xxxxx/dev/sts/backend-strapi4/frontend. Installing frontend dependencies Dependencies installed successfully. Dependencies installed successfully. Starting the app yarn run v1.22.17 warning ../../../package.json: No license field $ cross-env FORCE_COLOR=1 npm-run-all -l -p develop:* warning ../../../package.json: No license field warning ../../../package.json: No license field $ wait-on http://localhost:1337/admin && yarn --cwd frontend develop $ yarn --cwd backend develop warning ../../../../package.json: No license field $ strapi develop [develop:backend ] Building your admin UI with development configuration ... [develop:backend ] ℹ Compiling Webpack [develop:backend ] ✔ Webpack: Compiled successfully in 18.58s [develop:backend ] Admin UI built successfully [develop:backend ] [2021-12-28 02:53:44.582] debug: ⛔️ Server wasn't able to start properly. [develop:backend ] [2021-12-28 02:53:44.583] error: connect ECONNREFUSED 127.0.0.1:3306 [develop:backend ] Error: connect ECONNREFUSED 127.0.0.1:3306 [develop:backend ] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) [develop:backend ] -------------------- [develop:backend ] at Protocol._enqueue (/home/xxxxx/dev/sts/backend-strapi4/backend/node_modules/mysql/lib/protocol/Protocol.js:144:48) [develop:backend ] at Protocol.handshake (/home/xxxxx/dev/sts/backend-strapi4/backend/node_modules/mysql/lib/protocol/Protocol.js:51:23) [develop:backend ] at Connection.connect (/home/xxxxxx/dev/sts/backend-strapi4/backend/node_modules/mysql/lib/Connection.js:116:18) [develop:backend ] at /home/xxxxxxx/dev/sts/backend-strapi4/backend/node_modules/knex/lib/dialects/mysql/index.js:56:18 [develop:backend ] at new Promise ()
[develop:backend ] at Client_MySQL.acquireRawConnection (/home/xxxxxx/dev/sts/backend-strapi4/backend/node_modules/knex/lib/dialects/mysql/index.js:51:12)
[develop:backend ] at create (/home/xxxxx/dev/sts/backend-strapi4/backend/node_modules/knex/lib/client.js:237:39)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "develop:backend" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Command failed with exit code 1: yarn develop
at makeError (/home/xxxxx/.config/yarn/global/node_modules/execa/lib/error.js:60:11)
at handlePromise (/home/xxxx/.config/yarn/global/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async buildStarter (/home/xxxxx/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:201:3)