Podcast
Questions and Answers
Which authentication plugin was introduced in MariaDB 10.5 for enhanced security?
Which authentication plugin was introduced in MariaDB 10.5 for enhanced security?
The command 'ALTER USER username@host IDENTIFIED BY 'new_password';' can be used to change a database password.
The command 'ALTER USER username@host IDENTIFIED BY 'new_password';' can be used to change a database password.
True
What command is used to change the database engine to InnoDB?
What command is used to change the database engine to InnoDB?
ALTER TABLE tablename ENGINE = innodb
To change the database collation, use the command 'ALTER DATABASE name CHARACTER SET utf8mb4 COLLATE ___________'.
To change the database collation, use the command 'ALTER DATABASE name CHARACTER SET utf8mb4 COLLATE ___________'.
Signup and view all the answers
Match the following SCP options with their descriptions:
Match the following SCP options with their descriptions:
Signup and view all the answers
Which of the following rsync options is used to archive files and preserve permissions?
Which of the following rsync options is used to archive files and preserve permissions?
Signup and view all the answers
Suhosin is primarily used for PHP versions 7 and above.
Suhosin is primarily used for PHP versions 7 and above.
Signup and view all the answers
What is the main purpose of Opcache in PHP?
What is the main purpose of Opcache in PHP?
Signup and view all the answers
To enable opcache in the php.ini file, the directive should be set to ______.
To enable opcache in the php.ini file, the directive should be set to ______.
Signup and view all the answers
Match the following steps for migrating a website with their corresponding descriptions:
Match the following steps for migrating a website with their corresponding descriptions:
Signup and view all the answers
Study Notes
MariaDB 10.4 & 10.5
- MariaDB 10.5 introduced the
ed25519
authentication plugin for enhanced security. - You can change the user's authentication method to
ed25519
usingALTER USER username@host IDENTIFIED VIA ed25519 using 'new_password'
. - MariaDB 10.4 limits users to default authentication plugins like
mysql_native_password
.
Changing Database Password
- The command
ALTER USER username@host IDENTIFIED BY 'new_password';
updates the password for the specified user. - The command
ALTER USER IDENTIFIED BY
can be used to modify the password or authentication method.
Modifying Database Engine
- The command
ALTER TABLE tablename ENGINE = innodb
changes the storage engine for a table. -
ALTER TABLE ENGINE
can be used to alter the storage engine for a table.
Changing Database Collation
- The command
ALTER CHARACTER SET COLLATE
allows you to modify the character set and collation. - The command
ALTER DATABASE name CHARACTER SET utf8mb4 COLLATE utf8mb4_unico_ci;
changes the character set and collation for the entire database.
Varnish
- Varnish is a full-page caching solution that acts as a reverse proxy, handling only HTTP traffic.
- Varnish uses its own configuration language called VCL (Varnish Configuration Language).
-
PURGE
removes a specific cached file from Varnish. -
BAN
removes cached files, offering more options for control.
SCP vs Rsync
- SCP (Secure Copy Protocol) is used for secure file transfers via the command line.
-
scp
options includesource
anddestination
for copying files. -
scp -r
recursively copies directories and their contents. - SCP doesn't allow resuming transfers, unlike
rsync
. -
-r
option inscp
andrsync
recursively copies directories and contents. -
-p
option preserves timestamps during file transfers. -
-C
enables compression during transfers. -
-P
allows specifying a different port number. -
rsync
excels for website transfers and backups with features like incremental syncing. - The command
rsync -aVP source destination
offers a comprehensive combination of options for archival purposes. -
-a
enables archive mode, preserving permissions, timestamps, and ownership attributes. -
-v
provides verbose output for detailed information. -
-P
combines--progress
for transfer progress and--partial
(resume) for resuming interrupted transfers.
Website Migration Steps
- Back up the existing website completely.
- Set up the new server environment.
- Upload the website files to the new server.
- Import the database to the new server.
- Update configurations, such as PHP versions and dependencies.
- Test the website by configuring the local hosts file.
- Update the DNS settings to point to the new server once satisfied with the testing.
- Verify that the DNS propagation has begun.
Suhosin
- Suhosin is a security extension primarily for PHP versions before 7, like 5.6 or 5.x.
- It strengthens PHP environments by adding extra layers of protection against vulnerabilities and exploits.
- Suhosin focuses on preventing file-based attacks and session hijacking.
- It disables potentially dangerous functions like
eval
andshell_exec
to mitigate code execution risks. - Suhosin operates on the PHP level, preventing attacks even if vulnerabilities exist in the PHP code itself.
Opcache
- Opcache is a built-in caching engine in PHP that significantly speeds up script execution by storing pre-compiled bytecode in shared memory.
- This eliminates the need for repetitive parsing and compilation of scripts for each request, improving performance.
- Opcache may not be as ideal for highly dynamic websites where data is frequently changing.
- Opcache updates the cached bytecode automatically based on file timestamps.
- Opcache is enabled by default since PHP 5.5, and you can enable it explicitly by setting
opcache.enable=1
in php.ini. - You can use
opcache_reset
andopcache_invalidate
commands to manage the opcache.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Explore the key features of MariaDB 10.4 and 10.5 in this quiz. Learn about authentication methods, password changes, database engine modifications, and collation adjustments. Test your knowledge on how to utilize these commands effectively.