Skip to content
Home » mysql

mysql

Visit Tacticalware.com for information related to this tag and others. We look forward to assisting in your tech projects with our in-depth knowledgebase…

“MySQL: Host ‘IP’ is not allowed to connect to this MariaDB server”

If you are trying to connect Power BI to a Mysql/MariaDB server and receive the error “MySQL: Host ‘IP’ is not allowed to connect to this MariaDB server” perform the following

Login into the server via ssh

sudo bash

mysql -u root -p

Enter your mysql password

Type in the following:

CREATE USER 'newusernamehere'@'localhost' IDENTIFIED BY 'newpassword';
GRANT ALL PRIVILEGES ON *.* TO 'newusernamehere'@'localhost' WITH GRANT OPTION;
CREATE USER 'newusernamehere'@'%' IDENTIFIED BY 'newpassword';
GRANT ALL PRIVILEGES ON *.* TO 'newusernamehere'@'%' WITH GRANT OPTION;

Now retry your connection in Power BI using the new user and password you specified above

OPEN PORT 3306 ON UBUNTU 20.04 SERVER WITH MARIADB

Login to the server via ssh

sudo bash

nano /etc/mysql/mariadb.conf.d/50-server.cnf

Uncomment the line:
#port = 3306

Change 127.0.0.1 to the address of your server
bind-address = 192.168.1.100

Save the file, exit, and either reboot the server or restart the service.

Opening Ports on Ubuntu Server 12.04

How to Open Ports Through the Firewall

Originally written for Ubuntu 12.04, not much has changed.  Here are the quick and easy steps to open any port.  For this guide, we will focus on 3306, but you can change that number for any other port number.

In most cases following simple rule opens TCP port 3306:

iptables -A INPUT -i eth0 -p tcp -m tcp – -dport 3306 -j ACCEPT

Port is now open and you are done!