22

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.

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) Feb 9, 2014 at 21:01
  • @AlexHristov Windows firewall is disabled.
    – ItsJamie
    Feb 9, 2014 at 22:11

3 Answers 3

37

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.

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 recommendation Jun 23, 2021 at 23:32
24

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;
2
  • 7
    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 answer Nov 8, 2018 at 2:31
  • i performed LandiLeite's then Fidel. In combination it works. May 8, 2020 at 8:28
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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.