Issue
I have MariaDB Version 10.5.12-MariaDB-0+deb11u1 Raspbian 11 installed on my Raspberry Pi.
I have setup my firewall to allow access to port 3306 from everywhere: sudo ufw status
To | Action | From |
---|---|---|
22 | ALLOW | Anywhere |
3306 | ALLOW | Anywhere |
22 (v6) | ALLOW | Anywhere (v6) |
3306 (v6) | ALLOW | Anywhere (v6) |
My sql users are as follows: SELECT host, user FROM mysql.user;
Host | User |
---|---|
% | Marvin34565 |
% | root |
localhost | mariadb.sys |
localhost | mdbbackup |
localhost | mysql |
localhost | root |
I also commented out the bind-address = <ip-address>
part in my /etc/mysql/mariadb.conf.d/50-server.cnf file.
Other config lines are not present in any config file in my /etc/mysql/mariadb.conf.d/ or /etc/mysql/conf.d/ directories.
When connection from my devices in the same network, everything works like a charm. Both for the root and Marvin34565 user. But as soon as I switch out of my network (the hotspot of my phone) I can't connect to the DB anymore.
I have tried everything I could find on various sites but couldn't make it work. So, any ideas are greatly appreciated.
Solution
After Bills suggestion I noticed that - indeed - I couldn't ping between my networks. After setting up a port forward from my router to my Pi everything works as it should!
Answered By - Marvin34565 Answer Checked By - Terry (WPSolving Volunteer)