Install the complete package with local command reference and every published mode.
install mysqlmysqlUse :.
mysql [options] · mysql : <sql>mysqlshow the current
mysql -c <host> <user> [database] [-p <port>] [-s <socket>] [-charset <charset>] [-n] [-m [name]]connect; password is requested separately unless -n is used
-use <database>select another database
-llist databases
-tlist tables and views
-s <table>show columns and data types
-n <table> [rows]preview table rows
-f <table> <text> [rows]find text across table columns
-o <table> [-j|-csv] [file] [-f]export table rows
-a <table> : <json>insert one row from a JSON object
-w <table> <field> <value> : <json>update matching rows from a JSON object
-d <table> <field> <value>delete matching rows
-m [name]save the current connection in .lil.key; default name is the database
-M <name>remove a saved connection
-k [name]list saved connections or inspect one without showing its password
-K <name>connect using a saved connection
-edisconnect and clear connection data
mysql : <sql>execute native SQL
mysql load <file.sql>execute SQL from a file
mysql dump [file.sql] [-f]create a schema and data dump
mariadb [options]alias for @
-l lists databases, -t lists tables/views, -s shows column definitions, -n previews rows and -f searches text across a table. -o exports one table as JSON or CSV.
-a inserts a row from a JSON object. -w updates rows matching one field/value pair. -d deletes rows matching one field/value pair. For complex changes use native SQL after :.
dump creates a SQL schema/data backup without shell tools. load executes an SQL file. Large backups are written directly to disk rather than passed through terminal output redirection.
-c accepts host, user and optional database. The password is requested separately. -n explicitly requests a passwordless connection. -p changes the TCP port, -s selects a socket and -charset changes the connection charset.
-charset selects the connection charset. Table export refuses more than 100000 rows instead of writing a partial file.
Without -m, connection data remains scoped to the current PHP session. -m [name] explicitly stores the current profile in the protected .lil.key file (0600), -K <name> reconnects from it, -k lists or inspects profiles without exposing a stored password, and -M <name> removes one. kill removes .lil.key together with the other core state. Treat the file as sensitive because an opted-in profile can contain database credentials.
Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.
Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.
Base and Minimum are two packages of the same current module release, not separate command versions.
Install the complete package with local command reference and every published mode.
install mysqlInstall the reduced package. Local reference is omitted;
install mysql -mInstall exactly this published version.
install mysql -v 1.1.3Ask upgrade to check compatibility and replace the installed block only when needed.
upgrade mysqlRemove the extension block while leaving the core and unrelated modules intact.
install mysql -uExamples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.
mysql -use shop | mysql -t | mysql -n products 5Database shop
products
orders
id sku name category price active
1 SHOE-1 City shoe shoes 79.90 1
2 SHOE-2 Trail shoe shoes 109.00 1
3 BAG-1 Canvas bag bags 44.50 1mysql -c localhost app shopStatus connected
Server MySQL / MariaDB
Host localhost:3306
User app
Database shop
Charset utf8mb4mysql -linformation_schema
shopmysql -s productsField Type Null Key
id bigint NO PRI
sku varchar(64) NO UNI
name varchar(180) NO
category varchar(80) NO
price decimal(10,2) NO
active tinyint(1) NOmysql -f products "shoe" 20id sku name category price
1 SHOE-1 City shoe shoes 79.90
2 SHOE-2 Trail shoe shoes 109.00mysql -o products -j products.jsonSaved products.jsonmysql -a products : {"sku":"BAG-1","name":"Travel bag","price":49.90}Inserted 1mysql -w products sku BAG-1 : {"price":44.90}Updated 1mysql -d products sku BAG-1Deleted 1mysql : SELECT COUNT(*) AS products FROM productsproducts
4mysql dump shop.sqlSaved shop.sql
Tables 2
Views 0mysql load \sandbox\db\mysql.sqlAffected 1
Affected 0
Affected 0
Affected 2
Time 2 msmysql -e+mysql -s missing_tableTable not found: missing_tablesandbox/db/mysql.sqlThe example uses a file or directory from the protected /sandbox/ documentation workspace.
CREATE DATABASE IF NOT EXISTS shop CHARACTER SET utf8mb4;
USE shop;
CREATE TABLE products (id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, sku VARCHAR(64) UNIQUE NOT NULL, name VARCHAR(180) NOT NULL, category VARCHAR(80) NOT NULL, price DECIMAL(10,2) NOT NULL, active TINYINT(1) NOT NULL DEFAULT 1);
INSERT INTO products(sku,name,category,price,active) VALUES ('SHOE-1','City shoe','shoes',79.90,1),('BAG-1','Canvas bag','bags',44.50,1);
Adds explicit -m/-M/-k/-K profiles in .lil.key; listings never reveal a stored password.