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

maxccarvalho's avatar

MySql root Access

I'm trying to create a new user and grant access to a database but I keep receiving a access denied response from MySql.

I talked with Taylor and he told me to sudo su into my Digital Ocean droplet but the access denied continues.

So, anyone has a solution for that?

Thanks.

0 likes
4 replies
christopher's avatar

If you log in into your DigitalOcean Server you get the mysql password in the welcome message.

Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-24-generic x86_64)
....
*** System restart required ***
-------------------------------------------------------------------------------------
Thank you for using DigitalOcean's LEMP Application.
....
Your MySQL root user's password is ****

You can also find your MySQL Password in /etc/motd.tail

1 like
maxccarvalho's avatar

@hostianer thanks for your quick replay but, I'm not using DigitalOcean's LEMP application, my server was first configured by Laravel Forge. Also, the /etc/motd.tail file was not found in my server.

Any other suggestion?

Just to clarify, I have sudo password, and I can login into MySql, the problem is, I can login using PhpMyAdmin, I can login within the DG server in command line but, I keep receiving access denied through root@ when I tried to apply the changes.

maxccarvalho's avatar

I finally did! Login into mysql with SqlPro did the trick.

Thanks!!!!

christopher's avatar

Ah okay just thought because you wrote you have a DO Server :) Normally you get an email with your mysql passwort from forge. The user is always "forge" not root.

mysql -u forge -p

Please or to participate in this conversation.