Chapter 8. Creating Users and Granting Access
There is arguably no part of database programming that requires greater care in implementation than creating users and granting access. While the careless or malicious deletion of data is catastrophic, it can only occur at the hands of a trusted insider (whether a programmer or a database administrator) after a sufficient access control system is properly put into place.
MySQL for Python allows us to automate user creation and to administer access controls. In this chapter, we will see:
How to create and remove users in MySQL
Why removing a user is not as easy as
DROP
ping (usingDROP
) themThe limits of
MySQLdb
's ability toGRANT
accessWays to automate user creation and access control
The project for this chapter will build on the web application that we began in the last chapter.