Install error

  • 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] [1045] 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

    Error Output:

    Why does the installer looking for user with name forge?

  • Global Moderator

    This post is deleted!

  • Is anybody here?

  • admin


    Please check

    Re-run the installation with the --force flag.

  • Before running database migration, you should be able to modify the .env file in your project root, as well as creating a database on your server.

    Then in the .env file, you can set up the database's name, user, password and host settings.

    If no .env file exists on your project root, make a copy from the .env.example file and name it .env

    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__widgets add constraint dashboard__widgets_us
    er_id_foreign foreign key (user_id) references users (id) on delete cascade)

    SQLSTATE[HY000]: General error: 1005 Can't create table 'avg.#sql-2cc0_11' (errno: 150)

  • admin

    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.
    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...

  • admin

    That is explained in the github issue. Composer changed its behaviour on the latest version.

  • Are you going to fix this thing?

  • admin

    Of course yes, but I'm currently seeing if the composer behaviour will stay or not.

Log in to reply