Closed fiasst closed 4 months ago
After a lot of trial and error, I've got what feels very close to getting Contenta to install via:
composer run-script install:with-mysql
I now get the following message:
Marcs-MacBook-Pro:build marc$ composer run-script install:with-mysql
> scripts/install-mysql.sh
-----------------------------------------------
Installing Contenta CMS for local usage
-----------------------------------------------
EXECUTING /Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/drush site-install contenta_jsonapi --verbose --yes \
--root=/Users/marc/Documents/Work/playground/v2/build/web \
--db-url=mysql://root:[REDACTED]@localhost:3306/contenta_8_test1 \
--site-mail=admin@localhost \
--account-mail=admin@localhost \
--site-name=Contenta \
--account-name=admin \
--account-pass="[REDACTED]";
Executing: mysql --defaults-extra-file=/private/tmp/drush_VD3azi --database=contenta_8_test1 --host=localhost --port=3306 --silent < /private/tmp/drush_Q6HsAc > /dev/null
You are about to DROP all tables in your 'contenta_8_test1' database. Do you want to continue? (y/n): y
Sites directory [notice]
/Users/marc/Documents/Work/playground/v2/build/web/sites/default
already exists - proceeding.
Executing: mysql --defaults-extra-file=/private/tmp/drush_0Px7zq --database=contenta_8_test1 --host=localhost --port=3306 --silent < /private/tmp/drush_HFNb7h > /dev/null
Executing: mysql --defaults-extra-file=/private/tmp/drush_izNG6g --database=contenta_8_test1 --host=localhost --port=3306 --silent < /private/tmp/drush_RaUW0O
Starting Drupal installation. This takes a while. Consider using the [ok]
--notify global option.
Drupal\Core\Installer\Exception\InstallerException: Resolve all [error]
issues below to continue the installation. For help configuring your
database server, see the <a
href="https://www.drupal.org/docs/8/install">installation
handbook</a>, or contact your hosting provider.<div
class="item-list"><ul><li>Failed to connect to your database server.
The server reports the following message: <em
class="placeholder">SQLSTATE[HY000] [2054] The server requested
authentication method unknown to the client</em>.<ul><li>Is the
database server running?</li><li>Does the database exist or does the
database user have sufficient privileges to create the
database?</li><li>Have you entered the correct database
name?</li><li>Have you entered the correct username and
password?</li><li>Have you entered the correct database
hostname?</li></ul></li></ul></div> in
/Users/marc/Documents/Work/playground/v2/build/web/core/includes/install.core.inc:973
Stack trace:
#0
/Users/marc/Documents/Work/playground/v2/build/web/core/includes/install.core.inc(624):
install_get_form('Drupal\\Core\\Ins...', Array)
#1
/Users/marc/Documents/Work/playground/v2/build/web/core/includes/install.core.inc(577):
install_run_task(Array, Array)
#2
/Users/marc/Documents/Work/playground/v2/build/web/core/includes/install.core.inc(118):
install_run_tasks(Array, NULL)
#3
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/includes/drush.inc(728):
install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#4
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/includes/drush.inc(713):
drush_call_user_func_array('install_drupal', Array)
#5
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/commands/core/drupal/site_install.inc(82):
drush_op('install_drupal', Object(Composer\Autoload\ClassLoader),
Array)
#6
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/commands/core/site_install.drush.inc(271):
drush_core_site_install_version('contenta_jsonap...', Array)
#7
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/includes/command.inc(422):
drush_core_site_install('contenta_jsonap...')
#8
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/includes/command.inc(231):
_drush_invoke_hooks(Array, Array)
#9
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/includes/command.inc(199):
drush_command('contenta_jsonap...')
#10
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#11
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/includes/preflight.inc(67):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#12
/Users/marc/Documents/Work/playground/v2/build/vendor/drush/drush/drush.php(12):
drush_main()
#13 {main}
Command dispatch complete [notice]
ERROR The Drupal installer failed to install Contenta CMS.
Script scripts/install-mysql.sh handling the install:with-mysql event returned with error code 3
That doesn't give much away but when I change the MYSQL password in .env.local I get an Access Denied with Password error so it seems the database is being found and a connection is made successfully. I don't know how to debug it further though.
I run
sqlite3
and start SQL with
brew services start mysql
before I try an install.
I've checked database privileges too with:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON `contenta\_8\_test1`.* TO 'root'@'localhost';
I would really appreciate some suggestions.
I was able to install locally using Lando. Here's a blog post that helped - https://thinktandem.io/blog/2019/01/25/lando-contenta-cms-nuxt-pt-1/
Same error. Even Lando doesn't work for me. Getting Failed to drop or create the database:
If you are using Lando, try lando mysql
command. It downloaded the mysql image and started up the mysql container.
Than I ran lando drush si --db-url=mysql://drupal8:drupal8@database/drupal8
again and it worked for me.
Thank you I had too many issues (could never get it to start) and moved away from contenta but might try again in the future.
Hi, I know this has been discussed before because I've found all those issues when fault finding. I've tried all the solutions I can but unlike other examples, the error doesn't give additional details on why it fails.
I've spent a day trying to install Contenta and I haven't progressed at all and would really appreciate the support.
I have an issue with composer running out of memory even with memory_limit set to -1 which could be a problem. I haven't found out why that is yet.
I'm trying to install with:
composer run-script install:with-mysql
The error:
Contents of .env:
Contents of .env.local:
Thanks