Cant connect to MYSQL database with root account

August 8, 2019 109 views
Nginx PHP MySQL Ubuntu 18.04

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)

1 Answer
josvent90 August 8, 2019
Accepted Answer

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

Have another answer? Share your knowledge.