MariaDB not allowing remote connections
Asked Answered
H

3

23

enter image description here

enter image description here

As the screenshots show, I have the accounts setup to allow remote connections but as shown in the second screenshot I still cannot connect remotely.

Hoodoo answered 9/2, 2014 at 19:46 Comment(2)
Assuming that the credentials are fine, I would say a firewall is blocking you. Check the ports and ip's that are allowed to make connections(iptables in linux and unix-based os-es)Cobweb
@AlexHristov Windows firewall is disabled.Hoodoo
L
39

I use for testing in the virtual machine (Ubuntu 16.04), for me, I fixed the error changing the file 50-server.cnf.

My server is Ubuntu, so changing the file below:

50-server.cnf

The path of this file:

/etc/mysql/mariadb.conf.d

PS: Create a backup of the file before the change.

Only change in file the bind-address 127.0.0.0 to bind-address 0.0.0.0

After this restart service and try again.

Regarding that user, need to allow for external connections.

I hope that this info helps you.

Lymphangial answered 5/1, 2018 at 0:29 Comment(1)
in my conf i don't have any bind-address and what it happens when i add that line, mariadb shows a bounch of alerts, please don't follow this recommendationAgnate
S
25

Mysql by default binds to 0.0.0.0 which is all interfaces on your system. Which means you can already connect from another computer. The issue is perhaps permissions. You can enable remote connections by running the following command:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.%' IDENTIFIED BY '' WITH GRANT OPTION;
Squirmy answered 11/2, 2014 at 23:36 Comment(2)
After just installing 10.1.34-MariaDB, I found that 127.0.0.1 is the default binding, so I had to change it from bind-address = 127.0.0.1 to bind-address = 0.0.0.0. refer to LandiLeite's answerReticulum
i performed LandiLeite's then Fidel. In combination it works.Sophisticate
S
7

MariaDB packages bind MariaDB to 127.0.0.1 (the loopback IP address) by default as a security measure using the bind-address configuration directive. Old MySQL packages sometimes disabled TCP/IP networking altogether using the skip-networking directive.

Steps to allow remote connections are provided in the MariaDB Knowledge Base at https://mariadb.com/kb/en/mariadb/configuring-mariadb-for-remote-client-access/

Sleep answered 6/3, 2017 at 22:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.