First install an application named 'Termux' from playstore.
Open it and wait till installation is done then follow the steps.
1] Type apt update and press enter.
2] After the script is over type ** apt upgrade** and press enter.
(in both steps above and beyond press y wherever asked for.
3] Type pkg install mariadb and press enter. Allow some time to install it.
4] After successful installation follow these steps to start sql server
i) type mysqld_safe - u root & press enter
ii) type mysql press enter .
Mysql server is started successfully
if you get error in step 3] Then type cd ../usr/etc and press enter and type mkdir my.cnf.d and press enter and try again from step 3]
Follow step 4] every time you open termux to run sql server.
Click here to see video on these steps.