the cedar ledge

Learning MySQL

Date: March 15 2021

Summary: Notes on my adventures in learning MySQL syntax and concepts

Keywords: ##zettel #mysql #sql #query #language #databases #archive

Bibliography

Not Available

Table of Contents

    1. Security
      1. Adjusting Password Security
        1. Low Validate Password Policy
    2. Managing Users and Permissions
      1. User Creation
      2. Adding User Permissions
        1. Grant User Permission to Everything
    3. Manipulating Databases
      1. Create a Database
    4. Manipulating Tables
      1. Creating Tables
      2. Keys
        1. Primary Key
      3. Wildcards
        1. Gobble
        2. Placeholder
  1. How To Cite
  2. References
  3. Discussion:

Security

Adjusting Password Security

Low Validate Password Policy
SET GLOBAL validate_password.policy=LOW;

Managing Users and Permissions

User Creation

CREATE USER 'username'@'localhost' IDENTIFIED BY 'mypassword';

Adding User Permissions

Grant User Permission to Everything
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';

Manipulating Databases

Create a Database

CREATE DATABASE mydatabase;

Manipulating Tables

Creating Tables

Keys

Primary Key
CREATE TABLE foo (
	id INT PRIMARY KEY
);

Wildcards

Gobble
SELECT * FROM table WHERE last_name LIKE '%Smith';
Placeholder
SELECT * FROM table WHERE date LIKE '____-10%';

How To Cite

Zelko, Jacob. Learning MySQL. https://jacobzelko.com/03152021204433-mysql-programming. March 15 2021.

References

Discussion:

CC BY-SA 4.0 Jacob Zelko. Last modified: November 24, 2023. Website built with Franklin.jl and the Julia programming language.