0

I haven't been able to get my mysql-server on my raspberry pi to communicate with other network devices with networking enabled unless I manually start the server myself with sudo mysqld --bind-address 0.0.0.0 (I tried using a local address as well, still no luck).

When I check sudo lsof -i -P -n | grep mysqld to see if it's listening on the network, it isn't unless I run as root with --bind-address set.

Here is my config, if it helps determine the problem:

conf.d  debian.cnf  debian-start  mariadb.cnf  mariadb.conf.d  my.cnf  my.cnf.fallback
pi@pi1:~ $ cat /etc/mysql/my.cnf
# The MariaDB configuration file
[client-server]

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/English
bind-address    = 0.0.0.0
# skip-networking

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
pi@pi1:~ $```
0

Do you have a directory at /etc/mysql/mariadb.conf.d ? If so, look for a file named '50-server.cnf'. Try changing the bind-address to 0.0.0.0 in that file and reboot. The default on my install doesn't have a /etc/my.conf and reads the config from the file above.

  • That was the issue, thanks! I've never seen any mention of this config file before... – Asriel Repp Jul 21 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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