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

ABill's avatar
Level 4

MySql on ubuntu is not working properly

I have a digitalocean, ubuntu server. I set everything up and ran everything properly. This includes mysql, I created the db server, logged in and created my database, exited and ran my migrations but when I go to use the site it fails and says access denied for 'root'@'localhost'. This also happens when I try and connect to the database using mysql workbench... What is going on?! How can I be able to access my mysql server but the app can't?!

0 likes
1 reply
ejdelmonico's avatar

Did you create a DB user for the app like www or whatever user/group is assigned to nginx/apache? You need to create that user and give it proper permissions.

Please or to participate in this conversation.