30. Restart Apache2.
Use this command to restart Apache2 for the changes to take place.
$ sudo service apache2 restart
31. Edit Mariadb.
We need to tell Mariadb to use the new directory we just created for it on the Micro SD card.
$ sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
datadir = /var/lib/mysql
datadir = /media/Data/mysql
32. Restart Mariadb.
Use this command to restart Mariadb to allow the changes to take effect.
$ sudo service mariadb restart
Congratulations!! you have a full-blown LAMP server setup on a BeagleBown Black using the Micro SD card as extra storage.