Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

joshlittlewood's avatar

Issues with Deploying

Hello everyone,

I'm quite new to laravel development, and I get a basic laravel project with the Auth extension set up and running correctly locally. The only Issue is that I now cannot work out how to deploy it.

I have purchased a Digital ocean droplet and I also have an account on Forge and my project is currently pushed to github, but there doesn't seem to be any solid documentation out there for users who are now to this.

I am now getting this error within Forge "SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' "

Does anyone have any suggestions or know where I can find some good documentation?

Much appreciated!

0 likes
4 replies
fraserk's avatar

On forge you have to set the environment variables with the correct database credentials.

joshlittlewood's avatar

I have copied my .env file, which work locally, into the environment settings for Forge but I am still getting the same error. Here is my .env file...

APP_ENV=local APP_KEY=base64:VFchGtfXojEfICGl6vQsxQ/8KeLnDlN9D9mmF+E0MHc= APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=http://localhost

DB_CONNECTION=mysql DB_HOST=localhost DB_DATABASE=testdatabase DB_USERNAME=root DB_PASSWORD=

CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379

MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null

fraserk's avatar
fraserk
Best Answer
Level 16

You have use the DB setting forge emailed you when you first provision the server.

Please or to participate in this conversation.