gouseferoz
7 months ago

Unable to connect to database in Linux Server.

Posted 7 months ago by gouseferoz

I have just moved my project to a vps server and made changes to all my files.

The only problem i am facing is unable to connect to the database.

SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

my env file:


DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=instacks
DB_USERNAME=root
DB_PASSWORD=123456

I tried using tinker and I was able to save data into the tables. I was also able to migrate my tables.

But is unable to connect to the databases when trying to load something from db onto the page.

Is there anything i am missing?

Regards, Feroz.

Please sign in or create an account to participate in this conversation.