Have attempted several tutorials but encounter error after error.

1

There are 1 best solutions below

0
On

Are you sure that you have permission to connect to your database using root from 172.18.0.1?

Try running SHOW GRANTS on your database to see if you have the correct permissions set at a database level:

SHOW GRANTS FOR 'root';

You may also want to double check the .env file in the root of your Masonite directory. This is where your environment is defined. config/database.py uses the environmental variables you define in .env to configure access to your database (below is the default sqlite configuration).

DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=masonite
DB_USERNAME=root
DB_PASSWORD=root
DB_LOG=True