MemCP Console: Difference between revisions

From MemCP
Jump to navigation Jump to search
No edit summary
(Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference)
Line 1: Line 1:
There are two ways to access MemCP Scheme Console:
<!-- Copyright (C) 2026 Carl-Philip Haensch -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
= MemCP Console =


a) if you run <code>memcp</code>in the console, just type in your scheme commands
The interactive Scheme console is enabled when MemCP starts without <code>--no-repl</code>:


b) if you run <code>memcp</code>in docker or pm2 where you don't have access to the console, open a MySQL connection and type <code>SET syntax = 'scheme';</code>and then type in your commands followed by <code>;.</code>
<syntaxhighlight lang="bash">
./memcp lib/main.scm
</syntaxhighlight>


In option b) it might be that some commands like (help) output to memcp console instead of your mysql shell. So better keep that process open.
Run an expression non-interactively with:


== Further Reading ==
<syntaxhighlight lang="bash">
./memcp -c '(help)' lib/main.scm
</syntaxhighlight>


* [[Introduction to Scheme]]
Background and service deployments must use <code>--no-repl</code>; otherwise closing standard input ends the REPL and may stop the process. Capture stdout/stderr through the service manager and use the dashboard, processlist, and configured logs for operations.
 
Authorized MySQL sessions may expose an administrative Scheme parser mode when that capability is intentionally enabled. Scheme execution has direct process and storage access and must not be offered to untrusted database users. See [[Introduction to Scheme]], [[Security and Authentication]], and [[Dashboard and Operations]].

Revision as of 11:59, 28 August 2026

MemCP Console

The interactive Scheme console is enabled when MemCP starts without --no-repl:

<syntaxhighlight lang="bash"> ./memcp lib/main.scm </syntaxhighlight>

Run an expression non-interactively with:

<syntaxhighlight lang="bash"> ./memcp -c '(help)' lib/main.scm </syntaxhighlight>

Background and service deployments must use --no-repl; otherwise closing standard input ends the REPL and may stop the process. Capture stdout/stderr through the service manager and use the dashboard, processlist, and configured logs for operations.

Authorized MySQL sessions may expose an administrative Scheme parser mode when that capability is intentionally enabled. Scheme execution has direct process and storage access and must not be offered to untrusted database users. See Introduction to Scheme, Security and Authentication, and Dashboard and Operations.