one of the most conman error when connecting to MySQL server is “host is not allowed to connect to this MySQL server” this because of the user don’t have right privileges to connect to this MySQL server follow below steps to connection issue in MySQL
if you have full permission in MySQL
Open Mysq-> phpmyadmin
Go to User accounts section
Create a new user and give all the privilege as shown in the below image
if you have cpanel info
Go to MySQL® Databases section
Scroll down to Add New User section
After Scroll down to Add User To Database section
Select table and user and Add User To Database
Click all ALL PRIVILEGES and Make Changes