Remote connection to MySQL in BBB/Raspberry Pi/Linux

This post describes the required settings for MySQL in BBB/Raspberry/Linux so as to connect from a remote client in non root mode.

Connect to BBB/Raspberry/Linux shell using an SSH client such as PuTTY or direct connection.

sudo nano /etc/mysql/my.cnf


bind-address   = localhost


bind-address   =

Login to root mysql

debian@beaglebone:~$ sudo mysql -p

<enter root password>

mysql> GRANT ALL PRIVILEGES ON *.* TO 'user1'@'%'
         IDENTIFIED BY 'user1password';

change privileges of the required user to allow
remote connection. Note % symbol, which mean it
will allow from any domain including localhost.
By default is localhost.

*.* specifies grant to all databases. You can restrict
to specific database using

yourdatabase.* instead of *.*

Restart MySQL using

sudo service mysql restart

Now you will be able to connect to MySQL using non root database accounts.