susanBuck / e2-fall22

0 stars 0 forks source link

Issue setting up migrations in p3 #52

Closed berhanwa closed 1 year ago

berhanwa commented 1 year ago

Hi, I created the migrate method in my AppCommand.php file and included the createTable code. When I tried testing in terminal by invoking console and the migrate method, I got the PHP Fatal error message shown in the screenshot.

Has anyone run into something similar, and possibly have a solve for it?

Screenshot 2022-12-09 at 1 25 04 AM
susanBuck commented 1 year ago

Hi @berhanwa - Based on the output of "Access denied for user root" it looks like your .env file may still have to database connecting as the default root user. You should update this to reflect the hes MySQL user we created. Be sure to update the password as well.

For reference, here are the notes on when we created the new user: https://hesweb.dev/e2/notes/php/db-setup#create-a-new-mysql-user

And here are the notes on updating the .env: https://hesweb.dev/e2/notes/php/e2framework/database#database

berhanwa commented 1 year ago

That was it 😅 thank you so much @susanBuck!

susanBuck commented 1 year ago

You're welcome! : )