[Wiki] Install and configure mysql server and clients

I’ve been trying to follow the guide and and it seems things have changed meanwhile a bit…
So the steps I needed to take as of 13th January 2018 on OSMC 17.6 with a Debian Stretch fork:
Install MySQL (MariaDB in fact as replacement of MySQL)
sudo apt-get install mysql-server
confirm the extra packages and wait the installation to complete

Login the DB
sudo mysql

Create DB user
create user 'osmc' identified by 'osmc';

Give grants
grant all on *.* to 'osmc';

Reload privs
flush privileges;

Exit the DB console
quit

Now we need to change MariaDB conf file to allow access from other hosts than localhost
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
locate the line
bind-address = 127.0.0.1
and change the IP
bind-address = 0.0.0.0
Ctrl+X to exit, confirm you want to save the file

Restart the service
sudo service mysql restart

Follow the client setup of the original guide

2 Likes