Root account cannot connect

This is actually a good restriction. As a general thumb of rule, you should not use the root account for the applications.

Create another user, set the privileges accordingly and use that account from your application.

E.g:

CREATE USER 'bob'@'localhost' IDENTIFIED BY 'bobpasswd';
GRANT ALL PRIVILEGES ON * . * TO 'bob'@'localhost';

Leave a Reply