Database Security
Database Security
By: meow
Ch5
What is Encryption?
Encryption converts data into unreadable formats to prevent unauthorized
access.
Types of Encryption:
1. Symmetric Encryption: Uses the same key for encryption and
decryption.
2. Asymmetric Encryption: Uses a public key for encryption and a private
key for decryption
Example on Symmetric Encryption: AES, DES.
Example on Asymmetric Encryption: RSA, ECC.
AES Decryption:
SELECT AES_DECRYPT(EncryptedData, 'EncryptionKey') AS OriginalData;
Challenges in Encryption
1. Managing encryption keys securely.
2. Performance overhead for large datasets.
3. Ensuring compliance with evolving standards
Ch6
Backup in MySQL:
[mysqldump-u root -p --databases DatabaseName > C:\Backups\backup.sql]
Explanation: ) (شرح للكودThis command exports the entire database into a
backup file (backup.sql).
Restart MySQL:
Run the following cmd command:
[net stop mysql]
[net start mysql]
Explanation:
log_bin → Enables binary logging at a specific Windows path.
expire_logs_days=7 →Deletes logs older than 7 days
Recovery Basics: Backups
Types:
1. Full Backup: Entire database.
2. Incremental Backup: Only changes since the last backup.
3. Differential Backup: Changes since the last full backup
Challenges in Recovery
1. Insufficient or outdated backups.
2. High recovery time affecting operations.
3. Loss of incremental data between backups
CODE EXAMPLES
األقواس ذي
[]
الي حول االكواد مو ألزاميه حطيتها عشان تنتبهون للكود بس مو من ضمن الكود هي
ادعولي
<<3