使用cups + mysql打印作业会计?

I want to set up a server connected to a physical printer.This server hosts a site to allow users to login and send print jobs from their system either remotely or by first uploading it to the server and the server printing it locally , the host is linux machine , uses cups to print. the website needs following features : -

  1. display the printing stats for each user and amount of pages printed(maybe use mysql)

  2. interact with cups for handling print jobs

I have basic knowledge of php,mysql but no idea about cups.

How do i go about it and what are the keywords i should be looking for . Existing solutions like papercut or pykota are either expensive or too complicated for my simple requirements.

There is a fully-fledged CUPS job accounting software already: PyKota: written in Python, licensed under GPL, with quite a few supported database apps in its backend (MySQL amongst them, though they recommend to use Postgres).