Databases 23 min read

MySQL 5.7 FAQ Highlights: NDB Cluster, Stored Routines, Replication & Encryption

This curated excerpt from the MySQL 5.7 FAQ provides concise answers on NDB Cluster versions and deployment, network and hardware requirements, memory sizing formulas, virtual machine support, common error causes, user management, replication setup and limitations, trigger behavior, and InnoDB tablespace encryption details, linking to official documentation for deeper reference.

dbaplus Community
dbaplus Community
dbaplus Community
MySQL 5.7 FAQ Highlights: NDB Cluster, Stored Routines, Replication & Encryption

MySQL NDB Cluster (5.7)

MySQL 5.7 server does not include NDB Cluster; it is a separate product. Production‑ready series are 7.2, 7.3, 7.4, and 7.5 (latest 7.5.5). Download from http://dev.mysql.com/downloads/cluster/.

Check NDB support with any of:

SHOW VARIABLES LIKE 'have_%';
SHOW ENGINES;
SHOW PLUGINS;

Network: minimum 100 Mb Ethernet, gigabit recommended.

Typical deployment uses four machines: one management node, one SQL node, and two data nodes (provides redundancy). Additional SQL or management nodes can improve throughput and availability.

Memory estimate per data node:

(SizeofDatabase × NumberOfReplicas × 1.1) / NumberOfDataNodes

Index memory per row:

Primary‑key or hash index: 21‑25 bytes (stored in IndexMemory).

Sorted index: 10 bytes (DataMemory).

Primary‑key or unique index without HASH: 31‑35 bytes; with HASH: 21‑25 bytes.

Using HASH can speed updates by ~20‑30 % because sorted indexes are avoided.

The Perl script ndb_size.pl (included in MySQL 5.7) generates a detailed memory‑usage report for NDB tables.

Virtual machines are supported from NDB Cluster 7.2; Oracle VM is officially tested.

Stored Procedures and Functions

MySQL 5.7 supports both stored procedures and stored functions.

All routines are listed in INFORMATION_SCHEMA.ROUTINES. Example query:

SELECT ROUTINE_TYPE, ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_SCHEMA='dbname';

Use SHOW CREATE PROCEDURE or SHOW CREATE FUNCTION to view definitions.

Procedures can return result sets; functions cannot. Replication records DML events inside a procedure but does not replicate the procedure call itself. Functions that modify data are logged only as function calls.

To create functions without the SUPER privilege, set log_bin_trust_function_creators=1.

Replication

Replica servers do not need to stay continuously connected; they can reconnect after hours or days and catch up using retained binary logs.

Both master and replica must have networking enabled (do not use skip-networking).

MySQL provides no built‑in atomic lock protocol for multi‑master setups; application logic must tolerate out‑of‑order updates.

Performance tips: direct all writes to the master and distribute reads to replicas. On replicas you can use --skip-innodb, --low-priority-updates, and --delay-key-write=ALL to favor MyISAM tables.

High‑availability requires external monitoring and fail‑over scripts; manual fail‑over can be performed by reconfiguring applications or DNS to point to a standby server.

CJK Character Set Resources

Translations of the MySQL manual for Chinese, Japanese, and Korean are available from the official MySQL documentation site ( https://dev.mysql.com/doc/).

Triggers

MySQL 5.7 supports only row‑level triggers; statement‑level triggers are not available.

Multiple triggers for the same event and timing can be defined on a table. Execution order follows creation order but can be changed with FOLLOWS or PRECEDES clauses after FOR EACH ROW.

Replication behavior depends on binlog format:

Statement‑based replication recreates the trigger on the replica and executes the triggering statement.

Row‑based replication applies only the data changes; the trigger itself does not run on the replica.

InnoDB Tablespace Encryption

InnoDB tablespace encryption provides transparent AES‑256 encryption (ECB for key encryption, CBC for data). It supports all data types without length limits and requires no changes to applications.

Encryption is managed internally by MySQL; developers do not need to call encryption APIs directly.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

mysqlReplicationFAQTriggersStored ProceduresInnoDB EncryptionNDB Cluster
dbaplus Community
Written by

dbaplus Community

Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.