Reader small image

You're reading from  The SQL Workshop

Product typeBook
Published inDec 2019
Reading LevelBeginner
PublisherPackt
ISBN-139781838642358
Edition1st Edition
Languages
Concepts
Right arrow
Authors (3):
Frank Solomon
Frank Solomon
author image
Frank Solomon

Frank Solomon started out building front-end and database software with Microsoft stack tools such as SQL Server and ASP and then extended into ASP.NET, C#, VB.NET, JavaScript, and more. He learns about new products, languages, and technologies all the time, and he pushed into technical writing as a way to present and express his research and discoveries. He works as a contractor right now. He has worked in start-ups himself, and he knows that the hard work of writers and developers makes the end user experience easier.
Read more about Frank Solomon

Prashanth Jayaram
Prashanth Jayaram
author image
Prashanth Jayaram

Prashanth Jayaram is a database technologist, blogger, engineering lead, automation expert, TechNet wiki ninja, PowerShell Geek, and technologist enthusiast with extensive experience in designing database solutions. He is the author of PowerShell 6.0 Linux Administration Cookbook and has hands-on experience with the next generation database technologies. He has been awarded as ABOVE and BEYOND and Best SQL Author 2018 towards his contribution to SQL Server technology. He has articulated over 200+ articles widespread across SQL, NoSQL, PowerShell, Python, SQL on Linux, SQL on Azure, and SQL on AWS arenas.
Read more about Prashanth Jayaram

Awni Al Saqqa
Awni Al Saqqa
author image
Awni Al Saqqa

Awni Al Saqqa is a Microsoft Technology Specialist in MS SQL Server and a certified solutions developer since 2007. He has over a decade of experience with database development and administration on SQL Server, Oracle, and MySQL. He is a solutions architect, who is hands-on in many enterprise projects for different business sectors, such as education, hospitality, retail, manufacturing, marketing, and more, which has given him the perfect combination between business and technical experience.
Read more about Awni Al Saqqa

View More author details
Right arrow

9. Security

Overview

By the end of this chapter, you will be able to understand the need for access control. We will learn how to create users and user roles in MySQL. We will also learn how to grant and revoke permissions to user roles.

Introduction

In the previous chapter, we learned about SQL programming. We saw that SQL stored procedures, functions, and triggers help us automate database queries and integrate web and desktop applications with SQL database resources. We can now approach database tasks, problems, and questions with confidence. However, we have only worked in sandboxes, or safe, isolated environments. We haven't had to worry about security threats and hazards. Unfortunately, real-world scenarios potentially involve major security threats and hazards, which can lead to the theft of and damage to valuable data.

Database resources are valuable, and bad actors have plenty of motivation to steal, damage, and/or destroy data. Databases that house data involving national security information, financial information, medical histories, and personal employment histories are subject to malicious attacks from hostile actors. Hackers have successfully attacked government and corporate databases from the...

Access Control (Authorization)

So far, we've had full rights and control over our database resources because we created them as operating system (OS) account administrators. We could make any changes we wanted. Therefore, for modern databases, security focuses on who can do what to specific database resources in a granular way.

First, the database needs to identify or authenticate every user who wishes to access the database resources. A user will typically see a prompt to supply a login string (username) and a password string, to enter the system. MySQL has tools that define users with those login and password strings. Next, the database needs to authorize, or allow, each user one or more specific actions on one or more database components.

For a modern database, a user must supply a login string and a password string to gain entry to the system. Then, we can use those tools to give users permission to view, create, delete, and/or update all the database resources within...

Summary

In this chapter, we saw that MySQL offers flexible tools that allow the fine-grained security configuration of virtually all database resources. We have a responsibility to research the security needs of organization stakeholders, age lever these security tools to protect the database resources entrusted to us and defend the organizations that rely on those resources.

In the next chapter, we'll return back to programming and see some of the methods that will be used to provide statistical data from the database.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
The SQL Workshop
Published in: Dec 2019Publisher: PacktISBN-13: 9781838642358
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (3)

author image
Frank Solomon

Frank Solomon started out building front-end and database software with Microsoft stack tools such as SQL Server and ASP and then extended into ASP.NET, C#, VB.NET, JavaScript, and more. He learns about new products, languages, and technologies all the time, and he pushed into technical writing as a way to present and express his research and discoveries. He works as a contractor right now. He has worked in start-ups himself, and he knows that the hard work of writers and developers makes the end user experience easier.
Read more about Frank Solomon

author image
Prashanth Jayaram

Prashanth Jayaram is a database technologist, blogger, engineering lead, automation expert, TechNet wiki ninja, PowerShell Geek, and technologist enthusiast with extensive experience in designing database solutions. He is the author of PowerShell 6.0 Linux Administration Cookbook and has hands-on experience with the next generation database technologies. He has been awarded as ABOVE and BEYOND and Best SQL Author 2018 towards his contribution to SQL Server technology. He has articulated over 200+ articles widespread across SQL, NoSQL, PowerShell, Python, SQL on Linux, SQL on Azure, and SQL on AWS arenas.
Read more about Prashanth Jayaram

author image
Awni Al Saqqa

Awni Al Saqqa is a Microsoft Technology Specialist in MS SQL Server and a certified solutions developer since 2007. He has over a decade of experience with database development and administration on SQL Server, Oracle, and MySQL. He is a solutions architect, who is hands-on in many enterprise projects for different business sectors, such as education, hospitality, retail, manufacturing, marketing, and more, which has given him the perfect combination between business and technical experience.
Read more about Awni Al Saqqa