0

In Magento Data Migration process, Host is not allowed to connect to this MySQL server.

I check Mysql connection using normal PHP file and able to connect in Mysql service.

I also create a remote user in phpmyadmin but it also not working and give the error:

SQLSTATE[HY000] [1130] Host is not allowed to connect to this MySQL server

Does have any solution?

ibennetch
  • 341
  • 1
  • 10

1 Answers1

0

Seems that you do not have DB/Table PRIVILEGES with that DB username.

By default: it is pointed to the localhost's MySQL if you have LAMP stack on the same tier.

Ensure that you have connected to your Magento DB.

Default Magento Installation (if your DB username is magento), it is owned by magento user:

mysql> CREATE USER 'magento'@'localhost' IDENTIFIED BY 'your_password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'magento'@'localhost'
    ->     WITH GRANT OPTION;

By creating another user that can access the db and its table using a specified IP or wildcard range for remote machine to connect

Allow A Specified IP, for example, 1.2.3.4:

mysql> CREATE USER 'magento'@'1.2.3.4' IDENTIFIED BY 'your_password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'magento'@'1.2.3.4'
    ->     WITH GRANT OPTION;

Allow all IPs as a wildcard range (Not recommended):

mysql> CREATE USER 'magento'@'%' IDENTIFIED BY 'your_password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'magento'@'%'
    ->     WITH GRANT OPTION;
Kyros Koh
  • 101
  • 1