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 change bind-address = localhost to bind-address = 0.0.0.0
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.