Host is not allowed to connect to this MariaDB server

The error "Host is not allowed to connect to this MariaDB server" usually points to a remote access permission for a specific user/ip match.
It is required to add permissions to that user and ip from the mysql console:

As an example:
Add remote access for 1 user (in this case testuser), 1 database (testdb) and all IP's:

GRANT ALL PRIVILEGES ON testdb.* to 'testuser'@'%' IDENTIFIED BY 'testpassword';

Add remote access for 1 user (in this case testuser), 1 database (testdb) and 1 IP (100.1.10.11 in this example):

GRANT ALL PRIVILEGES ON testdb.* to 'testuser'@'100.1.10.11' IDENTIFIED BY 'testpassword';

Add remote access for 1 user (in this case testuser), all databases and 1 IP (100.1.10.11 in this example):

GRANT ALL PRIVILEGES ON *.* to 'testuser'@'100.1.10.11' IDENTIFIED BY 'testpassword';

Add remote access for 1 user (in this case testuser), all databases and all IP addresses:

GRANT ALL PRIVILEGES ON *.* to 'testuser'@'%' IDENTIFIED BY 'testpassword';

 

For all examples, the password used is testpassword. Make sure to change it according to your needs.

 

  • remote, access, mysql, wildcard, grant, all, privileges
  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

 Client does not support authentication protocol requested by server

If you have a mysql authentication issues related to the error below you can take the following...

 Connect to mysql server under docker

You can use below command to connect to a mysql dockerized version: mysql -u root -h 127.0.0.1...

 Database with latin1 content but over a utf8 connection

It is often the case where you want to migrate to a new server.The new server may be configured...

 ibdata reduce size

Step 01) MySQLDump all databases into a SQL text file (call it SQLData.sql) Step 02) Drop all...

 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

If you receive this error below when you try to import an sql into your database: Incorrect...