If multiple users were using the Python script, would they affect each other's global variables?
No. The script itself is just an ordinary text file; it has no state attached to it. All global variables belong not to the script but to the process that is executing it.
It doesn't even matter if it's run by the same user or by different users. Every time you run the script, the OS starts a new process with a fresh copy of the interpreter, which itself starts as a "blank slate" – it doesn't load any state and doesn't store any state unless you code that into the script itself.
(Open a Notepad window. Open a second Notepad window. Type some text into both. Notice that each window can have different text in it, even though both are the same Notepad.exe. That's actually not a good analogy, but it might do the job anyway.)
Is it possible with the operating system or with Python to only allow one user at the same time to use the application?
You will need to write Python code that enforces such limits, and the OS might provide features to help with that. Search for "locking".
(However, many methods only work within the same user account, or at least require root/administrator privileges to set up – for example, a 'mutex' or a 'semaphore' on Windows can only be made global by administrators, otherwise it's only visible to the same user who created it.)
One way is to rely on file locking. Have the script open an empty file and use
fcntl.flock() on Linux/macOS, or
win32file.LockFileEx() on Windows.
Because the script manages a MySQL database, you could also keep state within the database itself. It should be reliable to use
RELEASE_LOCK() SQL functions. (Some tools also do this by creating a separate "locking" table with entries to indicate what's locked, but that's tricky to get right.)