about RouteOS & MySQL & PHP

hello guys
i want to ask is possible to connect RouteOS with MySQL database to save users account details
cuz i want to control (create - delete - edits) users via PHP Pages !!

i have this diagram show how i want to make my network

i have ADSL+ Router i want link my web-server with it and RouterOS
then i want to link it with AP and other computers

the iam of this

to let my wifi network open with out password
but when users connect to it
the browser should open and ask them to login or signup
even for Ethernet users

how i can make it ?

RouterOS can not talk to MySQL (nor any other relational database) directly. It can, however, talk to RADIUS. You can setup FreeRADIUS, which can talk to MySQL (and also PostgreSQL, Oracle and sqlite), and then configure RouterOS to use RADIUS protocol for user authentication.

its school project
they asked me to make ( login page ) to access to internet
and user name & passwords should store in MySQL database cuz they want PHP admin Page to create account for users !!

do u have links explain how i can do this ?