Pabasara Ranathunga
Pabasara Ranathunga

Reputation: 170

Host '19x.xxx.xxx.xxx' is not allowed to connect to this MariaDB server

I am trying to add a database on "https://17x.xxx.xxx.xxx/phpmyadmin/" as my database for my Django project. I have given correct database name, username and password. But I get this error.

After deep investigation I found out that I cant access my database even from the command line or any other external source beside phpmyadmin site

The error that I get is,

django.db.utils.OperationalError: (1130, "Host '19x.xxx.xxx.xxx' is not allowed to connect to this MariaDB server")

I haven't done this before. The database server is not mine. Is there something wrong with the way I've proceeded?

Upvotes: 0

Views: 1756

Answers (1)

Pabasara Ranathunga
Pabasara Ranathunga

Reputation: 170

Well after several tries I found what was wrong. The problem was that there was no user in the db server for my local IP [private IP]. So I added a new user to phpmyadmin with required privileges and tried again and it worked.

mysql -u {user_name} -p{password} -h {db_host} {db_name}

and I got

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is xxxxxx Server version: 5.5.5-10.1.31-MariaDB MariaDB Serverckquote

Upvotes: 1

Related Questions