I try to install Asgardcms using composer create-project asgardcms/platform
But I get this eror:
php artisan module:migrate --force
Running for module: core
SQLSTATE[HY000]  Access denied for user 'forge'@'localhost' (using password: NO)
Script php artisan module:migrate --force handling the post-update-cmd event returned with an error
Why does the installer looking for user with name forge?
This post is deleted!
Is anybody here?
Re-run the installation with the
Before running database migration, you should be able to modify the
.envfile in your project root, as well as creating a database on your server.
Then in the
.envfile, you can set up the database's name, user, password and host settings.
.envfile exists on your project root, make a copy from the
.env.examplefile and name it
User forge is related to Laravel's configuration defaults, so it's expected that you have to change it properly to suit your own configuration.
UPDATE: Didn't notice you create the project directly via composer create-project, please follow the instructions @nWidart gave you on the post above.
When I run php artisan module:migrate --force, I get:
Running for module: dashboard
SQLSTATE[HY000]: General error: 1005 Can't create table 'avg.#sql-2cc0_11' (errno: 150) (SQL: alter table
dashboard__widgetsadd constraint dashboard__widgets_us
er_id_foreign foreign key (
id) on delete cascade)
SQLSTATE[HY000]: General error: 1005 Can't create table 'avg.#sql-2cc0_11' (errno: 150)
Please read the issue I linked above.
It says to empty your database...
Yes, I've read it. When I use php artisan module:migrate --force, my database is empty
I've solved this problem.
in mysql: SET GLOBAL FOREIGN_KEY_CHECKS=0;
then: module:migrate --force
and then in mysql: SET GLOBAL FOREIGN_KEY_CHECKS=1;
I don't understand why composer create-project asgardcms/platform runs migrations? I think that php artisan asgard:install has to run migrations...
That is explained in the github issue. Composer changed its behaviour on the latest version.
Are you going to fix this thing?
Of course yes, but I'm currently seeing if the composer behaviour will stay or not.
Follow this tutorial for installation of asgard CMS: https://www.cloudways.com/blog/how-to-install-asgardcms/
After composer command you have to use artisan command as well:
php artisan asgard:install