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 (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

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    =
# skip-networking

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

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 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.

| improve this answer | |
  • That was the issue, thanks! I've never seen any mention of this config file before... – Asriel Repp Jul 21 '19 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.