Report this

What is the reason for this report?

Cant connect to MYSQL database with root account

Posted on August 8, 2019

Could this be a problem with the firewall? Because I also hosted a game server and its works fine with the localhost. In fact, for I use the same database for the web and game server.

I also tried to create a new user with all the permissions. But still not working and throw the same error message

Connection failed: Access denied for user ‘root’@‘localhost’ (using password: YES)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
0

mysql -u root -p then it will ask for the root password

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.